xHasKx / luamqtt

luamqtt - Pure-lua MQTT v3.1.1 and v5.0 client
https://xhaskx.github.io/luamqtt/
MIT License
154 stars 41 forks source link

Why not temporary store message for QOS1 and QOS2? #44

Open zhaojh329 opened 1 year ago

Tieske commented 1 year ago

Can you clarify what problem you have that would be solved by this?

xHasKx commented 1 year ago

I suppose you want QoS>0 messages to be reliable preserved until delivery confirmation. If you really need that, you have to setup it somehow in your code independently of that lib, because it provides MQTT transport features only, without any kind of session storage.

zhaojh329 commented 4 months ago

Is message retransmission required for QOS1 and QOS2 in mqtt client?

Tieske commented 4 months ago

Is message retransmission required for QOS1 and QOS2 in mqtt client?

The library doesn't automatically do this. So if you need this to be reliable, your application code should keep track of messages until confirmation has been received (and do retransmissions where necessary).