MQTT QoS Explained: Understanding QoS 0, 1, and 2
January 30, 2026

MQTT QoS Explained: Understanding QoS 0, 1, and 2
In the world of IoT, network conditions can be unpredictable. To ensure reliable messaging, the MQTT protocol includes a crucial feature called Quality of Service (QoS). QoS defines the guarantee of message delivery between a client and the MQTT broker.
Choosing the right QoS level is a critical design decision, as it involves a trade-off between reliability and overhead (latency, bandwidth, and device processing power).
QoS 0: At Most Once
This is the fastest and least reliable delivery method. The publisher sends the message once and does not wait for an acknowledgment. It's a "fire and forget" approach.
- Guarantee: The message is delivered at most once, or not at all.
- Use Case: Ideal for non-critical, high-frequency sensor data where losing an occasional message is acceptable. Think of an ESP32 temperature sensor reporting every second. If one reading is missed, the next one will arrive shortly.
QoS 1: At Least Once
This level guarantees that the message will be delivered at least once. The sender stores the message and re-sends it until it receives a PUBACK (Publish Acknowledgment) packet from the receiver.
- Possible Issue: The receiver might get the message, but the sender doesn't receive the acknowledgment. The sender then resends the message, leading to duplicates. The receiving application must be designed to handle this.
- Use Case: Good for important commands where you must ensure receipt, such as in a smart home system. For example, sending a command to turn a light on.
QoS 2: Exactly Once
This is the most reliable but slowest method. It uses a four-part handshake to ensure the message is delivered exactly once, which is a core part of the publish-subscribe model.
- Guarantee: The message is delivered exactly once. No loss, no duplicates.
- Use Case: Essential for critical systems where data integrity is paramount, such as in industrial messaging with Sparkplug B or financial transactions.
Choosing the Right QoS Level
| QoS Level | Guarantee | Duplicates Possible? | Overhead | Use Case |
|---|---|---|---|---|
| 0 | At Most Once | No | Lowest | Non-critical sensor data, telemetry |
| 1 | At Least Once | Yes | Medium | Commands, alerts, status updates |
| 2 | Exactly Once | No | Highest | Critical control, financial transactions |