curiousmind
curiousmind

Reputation: 185

mosquitto does not resend message when subscriber reconnects

I am working with eclipse paho and mosquitto. I am sending message with QOS-1 level. I've changed mosquitto configuration as answered in this question.I am using mqtt lens to test. Mosquitto does not send message after disconnection and connection of subscriber.

Upvotes: 0

Views: 1461

Answers (1)

hardillb
hardillb

Reputation: 59816

Setting clean session to true will tell the broker to remove any messages queued for the client.

You need to set it to false if you want to receive any messages queued for that client.

The guys at HiveMQ have a blog post about persistent sessions and message queueing with MQTT: http://www.hivemq.com/blog/mqtt-essentials-part-7-persistent-session-queuing-messages

Upvotes: 2

Related Questions