O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Choosing a quality of service

We then need to choose a Quality of Service. There are three to choose from: At most once, At least once, and Exactly onceAt most once is the simplest, and requires only one MQTT packet to be sent for each publication. But the publication is not guaranteed to be received; it can be lost in transit. Since we regularly update our sensor data, we choose this service. It doesn't negatively affect system performance a great deal if packets are lost, and we avoid unnecessary control packets.

If you want to safeguard against accidental losses, you can use the At least once service instead. When such a packet is received, an Acknowledgement is returned as a receipt. The original packet is resent until an acknowledgement ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required