Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Retained message not delivered when reconnecting with persistent session

Good afternoon,

I am running the mosquitto-0.13-win32-bin\mosquitto-cygwin.exe broker:

1474627180: mosquitto version 0.13 (build date 2011-09-21 07:27:36+0100) starting
1474627180: Opening ipv6 listen socket on port 1883.
1474627180: Opening ipv4 listen socket on port 1883.
1474627252: New connection from ::1.
1474627252: New client connected from ::1 as mosquitto_pub_15668.
1474627261: New connection from ::1.
1474627261: New client connected from ::1 as mosquitto_sub_15260.

Then I post a retained message to a topic:

mosquitto_pub.exe -r -m Off -t test/licht

Finally when I subscribe to the topic the message is delivered just fine every time:

mosquitto_sub -c -t test/licht
Off

mosquitto_sub -c -t test/licht
Off

However when I subscribe to another topic, the retained message isn't delivered anymore:

mosquitto_sub -c -t xxx

Should the retained message be delivered in the above call too?

I have used persistent session (the "-c") flag throughout all the calls and so the previous subscription to the "test/licht" topic should be restored automatically and thus the retained message "Off" delivered again.

But this does not seem to happen and also I could not find any definition for using pertained messages with persistent sessions in the MQTT 3.1.1 OASIS doc...

Thank you
Alex



Back to the top