Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

half open broker socket is replaying stale msgs after reconnection

19 views
Skip to first unread message

Gawaskar kr

unread,
Jul 29, 2020, 6:50:17 AM7/29/20
to MQTT
Hi Guys, 
I am facing an issue and dont know if it is expected behaviour of mosquitto or it is a bug. May be i have missed some flag.

I have a subscriber and a publisher connected to broker. I am seeing following behaviour when i make the subscriber client link down and up.

keep alive time: 10 mins

1. subscriber to broker link goes down
2. publisher is still publishing msgs.
3. subscriber link comes up after 5 mins and it does a send__connect.
4. broker doesn't do CONNACK to subscriber yet.. it waits for keep alive timer to expire which is 10x1.5=15mins.
5. After 15 mins, broker sends LWT message to publisher and immediately does CONNACK 0 to subscriber.
6. subscriber subscribes to topic and it starte receiving old messages which were published by publisher at step 2.


subscriber and broker connection reconnects with cleanSession flag true and msgs on topic are with retain flag false, qos = 0.

Is this behaviour expected ? My requirement is to get latest msg after subscriber reconnects. Also When subscriber reconnects, is there
any way to connect it with broker immediately rather than waiting for keep alive timer to expire.


Any help is appreciated.

Thanks....

Roger Light

unread,
Jul 29, 2020, 10:28:14 AM7/29/20
to MQTT
Hi,

That doesn't sound like expected behaviour to me. I'm currently away, could you post the same summary to github.com/eclipse/mosquitto so we can continue the discussion there please?

Regards,

Roger

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/21200673-b234-4e92-863b-5b87afa20ab4o%40googlegroups.com.

Gawaskar kr

unread,
Jul 29, 2020, 10:37:01 AM7/29/20
to mq...@googlegroups.com
Thanks Roger..
Posted there.

Thanks..

You received this message because you are subscribed to a topic in the Google Groups "MQTT" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mqtt/Xv8kbcCYxNU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/CAH7zdycG8zYyZrMD7VKFMPj7uxQywbmbvb-v6G8TX6iKGc5_AQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages