QoS 1 – at least once
QoS 1 is more reliable than QoS 0. When a device goes offline (because of a power outlet, empty batteries, or any other reason), a message sent to it while it was offline will be stored in a message buffer on the MQTT server. When the device goes back online, the MQTT server will deliver all of the missed messages. Until the device comes back online, the server will keep hold of them.
Sometimes, messages are delivered more than once when using QoS 1. Here, it really depends on whether this produces any problems in your use case. Coming back to our smart lamp example, which can be either turned on by sending it an on command or off by sending it an off command, sending either of these commands twice is no problem.
QoS ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access