MOSQUITTO_RR(1) Commands MOSQUITTO_RR(1) (NAME) mosquitto_rr - MQTT 5/3.1.1 / (SYNOPSIS) mosquitto_rr [options] -e response-topic -t message-topic... {payload-options} options: [auth-options] [connection-options] [misc-options] [mqtt-options] [output-options] [tls-certificate-options | tls-psk-options] auth-options: [-u username] [-P password] connection-options: {[-h hostname] [--unix socket path] [-p port-number] | -L URL } [-A bind-address] [--nodelay] [-S] [--ws] [--proxy socks-url] misc-options: [--latency] [-o config-file] [-W message-processing-timeout] mqtt-options: [-c] [-D command identifier value] [-i client-id] [-I client-id-prefix] [-k keepalive-time] [-q message-QoS] [--retain-handling always | new | never] [-V protocol-version] [-x session-expiry-interval] [--will-topic topic [--will-payload payload] [--will-qos qos] [--will-retain]] output-options: [-d] [-N] [--pretty] [--quiet] [-R] [-v] payload-options: -f file | -m message | -n | -s tls-certificate-options: [--no-tls] {--cafile file | --capath dir} [--tls-use-os-certs] [--cert file] [--key file] [--ciphers ciphers] [--insecure] [--tls-alpn protocol] [--tls-keylog file] [--tls-version version] [--tls-engine engine] [--keyform {pem | engine}] [--tls-engine-kpass-sha1 kpass-sha1] tls-psk-options: --psk hex-key --psk-identity identity [--ciphers ciphers] [--tls-version version] mosquitto_rr [--help] (DESCRIPTION) mosquitto_rr MQTT 5/3.1.1 . MQTT v5 mosquitto_rr Request-Response . -t -e -f -m -n -s. : mosquitto_rr -t request-topic -e response-topic -m message (ENCRYPTED CONNECTIONS) TLS . . TLS x509 --cafile --capath . -p 8883 --cafile --capath . TLS TLS-PSK --psk --psk-identity ..SH " (OPTIONS)" mosquitto_rr : . (Default Config File) (POSIX) $XDG_CONFIG_HOME/mosquitto_rr $HOME/.config/mosquitto_rr %USERPROFILE%\mosquitto_rr . : -option value. . . () -S. TLS --no-tls () . # () . . . (Config File) 2.1 . -o config-file . -o . . (The options) -A IP . . -c, --disable-clean-session 'clean session' / (persistent client mode). (broker) (client id) . MQTT -x . QoS 1 QoS 2 . . --id . --cafile CA PEM. SSL . : --capath --capath CA PEM. SSL . --capath ".crt" "openssl rehash " . : --cafile --cert PEM . : --key (Encrypted Connections). --ciphers TLS openssl . ciphers(1) . -d, --debug (debug). -D, --property MQTT v5 . MQTT v5 . : -D command identifier value -D command identifier name value command / MQTT CONNECT PUBLISH PUBACK PUBREC PUBCOMP SUBSCRIBE UNSUBSCRIBE DISCONNECT AUTH WILL . (Properties) . identifier . '-' . : payload-format-indicator. (Properties) . value . name user-property . value . -e (response topic). . -f, --file . -F . . (Output Format) . -v -N . --help . -h, --host . localhost . -i, --id . MQTT . v3.1.1/v3.1 mosq-XXXXXXXXXXXXXXXXXX X - . v5.0 . -I, --id-prefix (PID) . clientid_prefixes . --id . --insecure . DNS (DNS spoofing) . . . -k, --keepalive PING . . --key PEM TLS (mutual TLS) . : --cert (Encrypted Connections). --keyform TLS . "pem" "engine" . TPM . "pem" . : --tls-engine. -L, --url (topic) URL. URL mqtt(s)://[username[:password]@]host[:port]/topic ws(s)://[username[:password]@]host[:port]/path . (scheme) : mqtt:// - 1883 mqtts:// - 8883 ws:// - 80 wss:// - 443. --latency 2.1 . mosquitto_rr . . (topic) . --latency --nodelay . -m, --message . -N (payload) . . -v . -n, --null-message ( ). --nodelay Nagle . . . --no-tls 2.1 . TLS. TLS . TLS 8883 . -o config-file 2.1 . . Default Config File Config File . -p, --port . 1883 MQTT 8883 MQTT TLS . -P, --pw . MQTT 3.1 3.1.1 . --username . --pretty JSON %j %J . --pretty . --proxy SOCKS5 . "None" "username" . socks-url socks5h://[username[:password]@]host[:port] . socks5h (resolve) . %25 %3A %40 % : @ . . 1080 . IPv6 socks5h://[::1]:1080. url . SOCKS curl(1) . --psk (pre-shared-key) ( 0x ) TLS-PSK. TLS-PSK --psk-identity . --psk-identity TLS-PSK. . -q, --qos (QoS) 0 1 2. 0 . QoS mqtt(7) . QoS . --quiet . ( --port ) . -R retain . retain <<>> . (wildcard) . . --retain-handling . --retain-handling always | new | never 2.1 . (retain handling) . (retained) . o always - o new - . (non-clean session) . . o never - -S SRV . -h _mqtt._tcp. _mqtt._tcp. . -s, --stdin-file stdin . -t, --topic (topic) MQTT . --tls-alpn MQTT WebSockets. --tls-engine openssl. openssl engine . --keyform . --tls-engine-kpass-sha1 SHA1 TLS. TLS TPM . SHA1 (hex) . --tls-engine. --tls-keylog file 2.1 . TLS file. tcpdump wireshark mqttshark TLS MQTT . Wireshark (Pre)-Master-Secret log filename Transport Layer Security . . --tls-use-os-certs CA . --cafile --capath TLS . -L mqtts://... 8883 . --tls-version TLS . tlsv1.3 tlsv1.2. tlsv1.2 . . -u, --username . --pw . --unix (unix domain socket) TCP. -h -L . : mosquitto_pub --unix /tmp/mosquitto.sock ... socket_domain mosquitto.conf(5) Mosquitto . -v, --verbose (verbose). "topic payload" . "payload" . -F. -V, --protocol-version MQTT . 5 311 31 mqttv5 mqttv311 mqttv31 . 311 . -W (timeout) . . . --will-payload . --will-topic . --will-qos (QoS) (Will). 0 . --will-topic . --will-retain (retained message) . --will-topic . --will-topic (topic) (Will) . --ws (WebSockets) TCP . -x session-expiry-interval CONNECT. MQTT v5 . (session) 0-4294967294 -1 4294967295 . -c -1 -c 0 . ( -x -c) (client id) . . (newline) -N . << >> (Payload-only) (payload) . (verbose) -v (topic) . . -F format-string . (format string) . . : % @ \. % MQTT . @ strftime(3) ( @ % - @ strftime ). . strftime . strftime @N . (resolution) . \ . (Flag characters) %A %C %d %E %F %f %I %l %m %p %R %S %t %x %X % . 0 (zero-padded). %A %E %d %F %f %l %m %S %X %x . . - 0 . - () . 0 . (Field width) MQTT printf . (pad) . %A %C %d %E %F %f %I %l %m %p %R %S %t %x %X . %10t (topic) . (Maximum width) MQTT printf %.20t . %C %I %R %t . %10.10t . (Hexadecimal binary field width) %x %X . (nibble) . %.2x 18 83 . !"#$&'()*+,-./:;<=>?@[\]^_`{|}~ . %.2:x 18:83 . (Floating point number printing consideration) IEEE 754 F ISO/IEC 9899:1999 . IEEE 754 %f %d . IEEE 754 . IEEE 754 . IEEE 754 . . MQTT (MQTT related parameters) o %% %. o %A topic-alias MQTT v5 . o %C content-type MQTT v5 . o %D correlation-data MQTT v5 . . o %d IEEE 754 (/double) . o %E message-expiry-interval MQTT v5 . o %F payload-format-indicator MQTT v5 . o %f IEEE 754 . o %l . o %m ( QoS>0 ). o %P user-property MQTT v5 . key:value . . o %p (payload) ( ). o %q (QoS) . o %R response-topic MQTT v5 . o %r (retained flag) . o %S subscription-identifier MQTT v5 . o %t (topic) . o %x (payload) ( ). o %X (payload) ( ). (Helpers) o %I ISO-8601 2016-08-10T09:47:38+0100 o %j JSON (timestamp) (escaped). : {"tst":"2020-05-06T22:12:00.000000+0100","topic":"greeting","qos":0,"retain":0,"payload":"hello world"} o %J JSON (timestamp) - JSON . : {"tst":"2020-05-06T22:12:00.000000+0100","topic":"foo","qos":0,"retain":0,"payload":{"temperature":27.0,"humidity":57}}. JSON "Error: Message payload is not valid JSON on topic " stderr . o %U (Unix timestamp) 1470818943.786368637 o @@ @. o @X X %X strftime . . o @N . (Escape characters) o \\ \. o \0 (null). ( topic payload) xargs(1) . o \a / (alert/bell). o \e ANSI . o \n (newline). o \r (carriage return). o \t . o \v . (broker) . mqtt(7) . --will-topic (topic) . (non-retained) QoS 0 . --will-retain --will-payload --will-qos . (PROPERTIES) -D / --property mosquitto_rr . : (Connect) o authentication-data ( - : ) o authentication-method ( UTF-8) o maximum-packet-size ( ) o receive-maximum ( ) o request-problem-information ( ) o request-response-information ( ) o session-expiry-interval ( -x ) o topic-alias-maximum ( ) o user-property ( UTF-8) o content-type ( UTF-8) o correlation-data ( - : ) o message-expiry-interval ( ) o payload-format-indicator ( ) o response-topic ( UTF-8) o topic-alias ( ) o user-property ( UTF-8) (Subscribe) o user-property ( UTF-8) (Unsubscribe) o user-property ( UTF-8) (Disconnect) o session-expiry-interval ( ) o user-property ( UTF-8) o content-type ( UTF-8) o correlation-data ( - : ) o message-expiry-interval ( ) o payload-format-indicator ( ) o response-topic ( UTF-8) o user-property ( UTF-8) o will-delay-interval ( ) (EXIT STATUS) . MQTT CONNACK . libmosquitto . CONNACK MQTT v3.1.1: o 0 o 1 : o 2 : o 3 : o 4 : / o 5 : CONNACK MQTT v5: o 0 o 128 o 129 o 130 o 131 o 132 o 133 o 134 o 135 () o 136 o 137 o 138 o 139 o 140 o 141 (Keep alive) o 142 o 143 o 144 o 147 o 148 o 149 o 148 o 151 o 152 o 153 (Payload) o 154 Retain o 155 (QoS) o 156 o 157 o 158 (Shared subscriptions) o 159 o 160 o 161 (Subscription IDs) o 162 (Wildcard subscriptions) : o 27 $XDG_CONFIG_HOME/mosquitto_rr, $HOME/.config/mosquitto_rr, $HOME/snap/mosquitto/current/.config/mosquitto_rr ( snap) . (BUGS) mosquitto : https://github.com/eclipse-mosquitto/mosquitto/issues (SEE ALSO) mosquitto(7), mqtt(7), mosquitto_pub(1), mosquitto_sub(1), mosquitto(8), libmosquitto(3), mosquitto-tls(7) (AUTHORS) Roger Light Mosquitto Project 04/03/2026 MOSQUITTO_RR(1)