emqtt
emqtt copied to clipboard
Question about ensuring message delivery between reconnects
I see emqtt once had an automatic reconnect feature but is has been removed. However I haven't found any recommended replacement.
Doing a quick test reveals unexpected disconnects (for instance, tcp_closed) results in a exit from the emqtt client process, which propagates to my process.
I could probably trap that exit signal and issue a reconnect from my proccess but then what about messages in flight?
Suppose I want to ensure QoS 1-2 messages got sent, do I need to build a queue within my process state and pop items from that queue only after receiving a PUBACK?
@yangm97 I have added reconnects in this PR with option {reconnect, true}
https://github.com/emqx/emqtt/pull/143
Have you tried that ?
@qzhuyan nope, if I remember correctly I used the latest release available at that time.
Any updates?