Reputation: 6345
As far as my understanding goes, when a message is published to a topic, it is received by only the clients currently subscribed to that topic. If a client turns up after the message is published, it won't receive that message.
Suppose a client is disconnected momentarily, is there a way to help the client catch-up with the messages missed when it is connected again?
Thanks
Upvotes: 1
Views: 2196
Reputation: 59608
If a client subscribes to a topic then the connection to the broker is dropped, the client will need to reconnect.
As long as client sets the cleanSession=false flag on the connection and resubscribes to the same topics the broker should replay any missed messages.
A more detailed description of durable subscriptions can be found here:
http://www.hivemq.com/mqtt-essentials-part-7-persistent-session-queuing-messages/
and here:
http://www.thingsprime.com/?p=2897
Upvotes: 3