Mosquitto publishing retained messages twice upon subscription

788 views
Skip to first unread message

Alexander Rust

unread,
Feb 22, 2013, 4:46:53 AM2/22/13
to mq...@googlegroups.com
Hi there, 

im currently observing an odd behavior with my Mosquitto broker.
When publishing some retained messages (QOS 0) they are received once by subscribed clients. 
However when I subscribe a new client to the topic after the retained message has been published, Mosquitto delivers the retained message twice for some topics. 
The topics for which this happens are always the same. Clearing the retained topic by publishing an empty retained message and publishing a different payload to the topic shows the same behavior. 

I verified that this is not just a problem with my clients, the following Mosquitto debug output of a client subscription to "#" clearly shows it publishing the same message to the same client twice.

1361525212: Sending PUBLISH to mqtt_737007998021.4031 (d0, q0, r1, m0, '/sys/158293-433MhzBridge/devices/Switch-2', ... (5 bytes))
1361525212: Sending PUBLISH to mqtt_737007998021.4031 (d0, q0, r1, m0, '/tag', ... (3 bytes))
1361525212: Sending PUBLISH to mqtt_737007998021.4031 (d0, q0, r1, m0, '/tag', ... (3 bytes))
1361525212: Sending PUBLISH to mqtt_737007998021.4031 (d0, q0, r1, m0, '/sys/158293-433MhzBridge/devices/Switch-3', ... (5 bytes))

I understand that QOS 0 does not guarantee that the message is delivered exactly once, but it feels like an odd and unnecessary behavior. 

Does anyone know why this happens or has experienced something similar? 

Roger Light

unread,
Feb 22, 2013, 5:56:44 AM2/22/13
to mq...@googlegroups.com
Hi Alexander,

This would probably be better discussed on the mosquitto list, but
that aside I think you're seeing the same bug as described here:
https://bugs.launchpad.net/mosquitto/+bug/1116233 I agree, it is odd
and unnecessary and will be fixed in due course.

Cheers,

Roger

Alexander Rust

unread,
Feb 23, 2013, 6:27:16 AM2/23/13
to mq...@googlegroups.com
Hi Roger, 

thanks, I had not found that report yet. 



--
--
To learn more about MQTT please visit http://mqtt.org

To post to this group, send email to mq...@googlegroups.com
To unsubscribe from this group, send email to
mqtt+uns...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/mqtt

---
You received this message because you are subscribed to the Google Groups "MQ Telemetry Transport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Mit freundlichen Grüßen / With kind regards
Alexander Rust
Reply all
Reply to author
Forward
0 new messages