|
|
|
@ -424,7 +424,7 @@
|
|
|
|
|
or ws(s)://[username[:password]@]host[:port]/path
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
Depending on the scheme, the port will default to
|
|
|
|
|
Depending on the scheme, the port will default to
|
|
|
|
|
different values. mqtt:// - 1883, mqtts:// - 8883,
|
|
|
|
|
ws:// - 80, wss:// - 443.
|
|
|
|
|
</para>
|
|
|
|
@ -453,27 +453,27 @@
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><option>--no-tls</option></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
Disable all use of TLS encryption. This is useful if you
|
|
|
|
|
specify TLS options in a configuration file but want to
|
|
|
|
|
disable those options. It also stops the automatic use
|
|
|
|
|
of TLS when connecting to port 8883.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
Disable all use of TLS encryption. This is useful if you
|
|
|
|
|
specify TLS options in a configuration file but want to
|
|
|
|
|
disable those options. It also stops the automatic use
|
|
|
|
|
of TLS when connecting to port 8883.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><option>-p</option></term>
|
|
|
|
|
<term><option>--port</option></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
Connect to the port specified. If not given, the
|
|
|
|
|
default of 1883 for plain MQTT or 8883 for MQTT over
|
|
|
|
|
TLS will be used.
|
|
|
|
|
<para>
|
|
|
|
|
Connect to the port specified. If not given, the
|
|
|
|
|
default of 1883 for plain MQTT or 8883 for MQTT over
|
|
|
|
|
TLS will be used.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
See the <option>--no-tls</option> if you want to use
|
|
|
|
|
port 8883 without TLS.
|
|
|
|
|
</para>
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
|
<varlistentry>
|
|
|
|
@ -489,7 +489,7 @@
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><option>--pretty</option></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
<para>
|
|
|
|
|
When using the JSON output format %j or %J, the default
|
|
|
|
|
is to print in an unformatted fashion. Specifying
|
|
|
|
|
<option>--pretty</option> prints messages in a prettier,
|
|
|
|
@ -710,14 +710,14 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><option>--tls-use-os-certs</option></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
If used, this will load and trust the OS provided CA
|
|
|
|
|
certificates. This can be used in conjunction with
|
|
|
|
|
<option>--cafile</option> and <option>--capath</option>
|
|
|
|
|
and can be used on its own to enable TLS mode. This
|
|
|
|
|
<para>
|
|
|
|
|
If used, this will load and trust the OS provided CA
|
|
|
|
|
certificates. This can be used in conjunction with
|
|
|
|
|
<option>--cafile</option> and <option>--capath</option>
|
|
|
|
|
and can be used on its own to enable TLS mode. This
|
|
|
|
|
will be set by default if <option>-L mqtts://...</option>
|
|
|
|
|
is used, or if port is 8883 and no other certificate
|
|
|
|
|
options are used.
|
|
|
|
|
is used, or if port is 8883 and no other certificate
|
|
|
|
|
options are used.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
@ -827,13 +827,13 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
<term><option>-w</option></term>
|
|
|
|
|
<term><option>--watch</option></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
Messages will be printed on a fixed line number based on
|
|
|
|
|
the topic and order in which topics are received. Useful
|
|
|
|
|
for monitoring multiple topics that have single line
|
|
|
|
|
payloads. Unexpected behaviour will occur if there are
|
|
|
|
|
more topics than lines in the terminal, or if the
|
|
|
|
|
payload occupies more than a single line.
|
|
|
|
|
<para>
|
|
|
|
|
Messages will be printed on a fixed line number based on
|
|
|
|
|
the topic and order in which topics are received. Useful
|
|
|
|
|
for monitoring multiple topics that have single line
|
|
|
|
|
payloads. Unexpected behaviour will occur if there are
|
|
|
|
|
more topics than lines in the terminal, or if the
|
|
|
|
|
payload occupies more than a single line.
|
|
|
|
|
This can be used in conjuction with other output options
|
|
|
|
|
e.g. <option>-F</option>.
|
|
|
|
|
</para>
|
|
|
|
@ -956,13 +956,13 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
|
<title>Field width</title>
|
|
|
|
|
<para>
|
|
|
|
|
Some of the MQTT related parameters can be formatted with an
|
|
|
|
|
option to set their field width in a similar way to regular
|
|
|
|
|
printf style formats, i.e. this sets the minimum width when
|
|
|
|
|
printing this parameter. This applies to the options %A, %C,
|
|
|
|
|
%d, %E, %F, %f, %I, %l, %m, %p, %R, %S, %t, %x, %X.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
Some of the MQTT related parameters can be formatted with an
|
|
|
|
|
option to set their field width in a similar way to regular
|
|
|
|
|
printf style formats, i.e. this sets the minimum width when
|
|
|
|
|
printing this parameter. This applies to the options %A, %C,
|
|
|
|
|
%d, %E, %F, %f, %I, %l, %m, %p, %R, %S, %t, %x, %X.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
For example <option>%10t</option> would set the minimum topic
|
|
|
|
|
field width to 10 characters.
|
|
|
|
@ -971,16 +971,16 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
|
<title>Maximum width</title>
|
|
|
|
|
<para>
|
|
|
|
|
Some of the MQTT related parameters can be formatted with an
|
|
|
|
|
option to set a maximum field width in a similar way to regular
|
|
|
|
|
printf style formats. This applies to the options %C, %I, %R, %t.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
Some of the MQTT related parameters can be formatted with an
|
|
|
|
|
option to set a maximum field width in a similar way to regular
|
|
|
|
|
printf style formats. This applies to the options %C, %I, %R, %t.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
For example <option>%10.10t</option> would set the minimum topic
|
|
|
|
|
field width to 10 characters, and the maximum topic width to
|
|
|
|
|
10 characters, i.e. the field will always be exactly 10
|
|
|
|
|
characters long.
|
|
|
|
|
10 characters, i.e. the field will always be exactly 10
|
|
|
|
|
characters long.
|
|
|
|
|
</para>
|
|
|
|
|
</refsect2>
|
|
|
|
|
|
|
|
|
@ -1165,12 +1165,12 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
|
<title>Exit Status</title>
|
|
|
|
|
<para>
|
|
|
|
|
mosquitto_sub returns zero on success, or non-zero on error. If
|
|
|
|
|
the connection is refused by the broker at the MQTT level, then
|
|
|
|
|
the exit code is the CONNACK reason code. If another error
|
|
|
|
|
occurs, the exit code is a libmosquitto return value.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
mosquitto_sub returns zero on success, or non-zero on error. If
|
|
|
|
|
the connection is refused by the broker at the MQTT level, then
|
|
|
|
|
the exit code is the CONNACK reason code. If another error
|
|
|
|
|
occurs, the exit code is a libmosquitto return value.
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
<para>MQTT v3.1.1 CONNACK codes:</para>
|
|
|
|
|
<itemizedlist mark="circle">
|
|
|
|
|