June 30, 2021
7:51 a.m.
On 29 Jun 2021, at 20:10, Esteban Maringolo <emaringolo@gmail.com> wrote:
I already got MQTT running, It's not completely clear to me how the QoS setting works (atLeastOnce, exactlyOnce, atMostOnce), I don't remember using that setting in Java (it probably had a sensible default).
From the comments in MQTTPacket class side
atMostOnce "Quality of service level 0 - no acks, send and forget" ^ 0 atLeastOnce "Quality of service level 1 - single acks, possible duplicates" ^ 1 exactlyOnce "Quality of service level 2 - no loss, no duplicates" ^ 2 The lowest one is the fastest, but won't work with persistent queues. In most cases the middle level is OK and enough - duplicates can only occur when you do not receive the ack.