lua-eco icon indicating copy to clipboard operation
lua-eco copied to clipboard

MQTT spuriously retransmits

Open nwf opened this issue 1 year ago • 1 comments

https://github.com/zhaojh329/lua-eco/blob/3b69a48ca3ac50f48ea0a09996d78e49b72a44ca/mqtt.lua#L181 will retransmit messages even if the TCP link is healthy, such that the earlier copies are still likely to reach the broker. AIUI, retransmission should occur only in the case that the connection drops and is re-established and this is mandated in MQTT 5 (see https://www.hivemq.com/blog/mqtt5-essentials-part2-foundational-changes-in-the-protocol/ , though I'm having trouble finding the claimed prohibition in the actual spec document).

nwf avatar Aug 31 '24 02:08 nwf

I am really confused about the mqtt message retransmission mechanism. You are welcome to submit your code to improve it.

zhaojh329 avatar Aug 31 '24 04:08 zhaojh329