OS Manuals

/usr/bin/mosquitto_rr

open source MQTT broker

From mosquitto 2.1.2-r7 (os), captured 2026-11-05 by running mosquitto_rr --help (exit 1). permalink

Also provided by 1 other package version
mosquitto_rr is an mqtt client that can be used to publish a request message and wait for a response.
             Defaults to MQTT v5, where the Request-Response feature will be used, but v3.1.1 can also be used
             with v3.1.1 brokers.
mosquitto_rr version 2.1.2 running on libmosquitto 2.1.0.

Usage: mosquitto_rr {[-h host] [--unix path] [-p port] [-u username] [-P password] -t topic | -L URL} -e response-topic
                    {-f file | -l | -n | -m message}
                    [-c] [-k keepalive] [-q qos] [-R] [-x session-expiry-interval]
                    [-F format]
                    [-W timeout_secs]
                    [-A bind_address] [--nodelay]
                    [-i id] [-I id_prefix]
                    [-d] [-N] [--quiet] [-v]
                    [--will-topic [--will-payload payload] [--will-qos qos] [--will-retain]]
                    [--no-tls]
                    [{--cafile file | --capath dir} [--cert file] [--key file]
                      [--ciphers ciphers] [--insecure]
                      [--tls-alpn protocol]
                      [--tls-engine engine] [--keyform keyform] [--tls-engine-kpass-sha1]]
                      [--tls-use-os-certs]
                    [--proxy socks-url]
                    [-D command identifier value]
                    [-o options-file]
       mosquitto_rr --help

 -A : bind the outgoing socket to this host/ip address. Use to control which interface
      the client communicates over.
 -c : disable clean session/enable persistent client mode
      When this argument is used, the broker will be instructed not to clean existing sessions
      for the same client id when the client connects, and sessions will never expire when the
      client disconnects. MQTT v5 clients can change their session expiry interval with the -x
      argument.
 -d : enable debug messages.
 -D : Define MQTT v5 properties. See the documentation for more details.
 -e : Response topic. The client will subscribe to this topic to wait for a response.
 -F : output format.
 -h : mqtt host to connect to. Defaults to localhost.
 -i : id to use for this client. Defaults to mosquitto_rr_ appended with the process id.
 -k : keep alive in seconds for this client. Defaults to 60.
 -L : specify user, password, hostname, port and topic as a URL in the form:
      mqtt(s)://[username[:password]@]host[:port]/topic
      ws(s)://[username[:password]@]host[:port]/topic
 -N : do not add an end of line character when printing the payload.
 -o : provide options in a file rather than on the command line.
      See the Options section of https://mosquitto.org/man/mosquitto_pub-1.html
 -p : network port to connect to. Defaults to 1883 for plain MQTT and 8883 for MQTT over TLS.
 -P : provide a password
 -q : quality of service level to use for communications. Defaults to 0.
 -R : do not print stale messages (those with retain set).
 -t : topic where the request message will be sent.
 -u : provide a username
 -v : print received messages verbosely.
 -V : specify the version of the MQTT protocol to use when connecting.
      Defaults to 5.
 -W : Specifies a timeout in seconds how long to wait for a response.
 -x : Set the session-expiry-interval property on the CONNECT packet. Applies to MQTT v5
      clients only. Set to 0-4294967294 to specify the session will expire in that many
      seconds after the client disconnects, or use -1, 4294967295, or ∞ for a session
      that does not expire. Defaults to -1 if -c is also given, or 0 if -c not given.
 --help : display this message.
 --nodelay : disable Nagle's algorithm, to reduce socket sending latency at the possible
             expense of more packets being sent.
 --pretty : print formatted output rather than minimised output when using the
            JSON output format option.
 --quiet : don't print error messages.
 --unix : connect to a broker through a unix domain socket instead of a TCP socket,
          e.g. /tmp/mosquitto.sock
 --will-payload : payload for the client Will, which is sent by the broker in case of
                  unexpected disconnection. If not given and will-topic is set, a zero
                  length message will be sent.
 --will-qos : QoS level for the client Will.
 --will-retain : if given, make the client Will retained.
 --will-topic : the topic on which to publish the client Will.
 --ws : connect using WebSockets.
 --cafile : path to a file containing trusted CA certificates to enable encrypted
            certificate based communication.
 --capath : path to a directory containing trusted CA certificates to enable encrypted
            communication.
 --cert : client certificate for authentication, if required by server.
 --key : client private key for authentication, if required by server.
 --ciphers : openssl compatible list of TLS ciphers to support.
 --tls-use-os-certs : Load and trust OS provided CA certificates.
 --tls-version : TLS protocol version, can be one of tlsv1.3 or tlsv1.2.
                 Defaults to tlsv1.2 if available.
 --insecure : do not verify the the server certificate. Using this option means that
              you cannot be sure that the remote host is the server you wish to connect
              to and so is insecure.
              Do not use this option in a production environment.
 --proxy : SOCKS5 proxy URL of the form:
           socks5h://[username[:password]@]hostname[:port]
           Only "none" and "username" authentication is supported.

See https://mosquitto.org/ for more information.

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.