From e95327789e5304d50e6c36b476f2dc1bcd955e30 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 29 Oct 2020 19:39:29 +0000 Subject: [PATCH] Note that zero length retained messages are never retained. Closes #1871. Thanks to James Kleeh. --- man/mosquitto_pub.1.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/man/mosquitto_pub.1.xml b/man/mosquitto_pub.1.xml index aef7143e..1856305c 100644 --- a/man/mosquitto_pub.1.xml +++ b/man/mosquitto_pub.1.xml @@ -454,13 +454,21 @@ - If retain is given, the message will be retained as a "last known good" value on the broker. See mqtt7 for more information. + + If retain is given, the message will be retained as a + "last known good" value on the broker. See + mqtt7 + for more information. Note that zero length payloads + are never retained. If you send a zero length + payload retained message it will clear any retained + message on the topic. + - If the publish mode is, + If the publish mode is, , or (i.e. the modes where only a single message is sent), then can be used to specify that the @@ -604,8 +612,12 @@ If given, if the client disconnects unexpectedly the - message sent out will be treated as a retained message. - This must be used in conjunction with . + message sent out will be treated as a retained message. + This must be used in conjunction with . + Note that zero length payloads are never retained. If you send a zero length + payload retained message it will clear any retained + message on the topic. +