Compare MQTT QoS 0, QoS 1, and QoS 2 delivery guarantees, overhead, retry behavior, and subscriber QoS caps.
animation
mqtt
protocols
qos
reliability
Learner-ready MQTT QoS delivery workbench with scenario presets, step/play packet flow, loss and acknowledgement cases, effective subscriber QoS calculation, duplicate-risk guidance, source links, and local desktop/mobile visual verification.
AnimationMQTTDelivery guaranteesIntermediate
MQTT QoS Delivery Workbench
Choose a message scenario, step through the MQTT packet exchange, and see how QoS changes delivery confidence, overhead, duplicate risk, and subscriber delivery.
Selected guaranteeAt least once
Normal packet path2 packets
Subscriber deliveryQoS 1
Current riskDuplicate possible
TrySelect Alarm alert, QoS 1, Subscriber QoS 1, and Lost PUBACK; then Step through the retransmitted PUBLISH.
ObserveCurrent risk becomes duplicate application delivery after 1 lost PUBACK, whereas QoS 2 adds PUBREC/PUBREL/PUBCOMP state to suppress duplicate handoff.
ExplainQoS 1 retries the same Packet Identifier with DUP until PUBACK, guaranteeing at least once; QoS 2's two-phase exchange records delivery state on each hop.
Telemetry, alarms, commands, and billing records do not need the same delivery guarantee.
2. Watch the handshake
QoS 0 uses one PUBLISH, QoS 1 adds PUBACK, and QoS 2 uses PUBLISH, PUBREC, PUBREL, PUBCOMP.
3. Test the failure
Lost publishes, lost acknowledgements, and reconnects change what the protocol can promise.
4. Check the subscriber cap
The delivery to a subscriber is capped by the subscriber's requested maximum QoS.
1. PublishClient sends the application message to the broker.
2. ConfirmThe broker responds if the selected QoS requires it.
3. Retry or stateLoss can trigger retry or stored handshake state.
4. DeliverThe broker forwards to matching subscribers at effective QoS.
5. DecideThe learner weighs reliability, latency, battery, and app safety.
Animated packet path
Use Play or Step to trace the selected QoS exchange. The packet label, active stage, and diagnosis update together.
Active packetPUBLISH
PublisherMQTT client
->
Brokerstores QoS state
Active packetPUBLISH
Brokerapplies subscription cap
->
Subscriberreceives QoS 1
QoS 1 keeps state until PUBACK arrives.
QoS 1 publish requires acknowledgement.The publisher keeps the message until PUBACK arrives. If PUBACK is lost, a retry can create a duplicate delivery.
Protocol guaranteeAt least once
The sender retries until PUBACK is received, so duplicates are possible.
OverheadModerate
Two packets are normal on the publisher-broker hop.
Subscriber QoSQoS 1
Publisher QoS 1 and subscriber maximum QoS 1 produce QoS 1 delivery.
RecommendationGood fit
This scenario needs confirmation, and duplicate-safe application handling is acceptable.
Scenario and controls
Change the message need, QoS level, failure case, and subscriber maximum QoS. The recommendation and packet path update immediately.
MQTT QoS is negotiated per hop. The publisher-broker path can use QoS 2 while a subscriber that requested QoS 0 still receives at QoS 0.
Learning Support
QoS 0At most once
One PUBLISH packet. There is no acknowledgement, no retry, and no protocol evidence that the broker received the message.
QoS 1At least once
PUBLISH plus PUBACK. Retransmission protects delivery but can duplicate the application message.
QoS 2Exactly once at protocol hop
PUBLISH, PUBREC, PUBREL, and PUBCOMP coordinate state so that this MQTT hop does not deliver duplicates.
Technical Quick Reference
Packet IdentifierQoS 1 and QoS 2 only
QoS 0 PUBLISH has no Packet Identifier. QoS 1 and QoS 2 use one so acknowledgements match in-flight messages.
Effective QoSmin(publish, subscribe)
A broker forwards at no higher QoS than the subscriber requested, even when the original publish used a higher QoS.
Application safetyProtocol is not the whole system
QoS confirms MQTT delivery semantics. It does not prove a lock moved, a valve closed, or a business action committed.