← Back to the chapter · Previous detail
Technical detail · MQTT Session Management
QoS delivery legs and device outcome evidence
I’ll follow the valve’s command across both delivery legs before treating a QoS setting as evidence of its outcome.
The delivery path has separate publisher-to-broker and broker-to-subscriber exchanges. The subscriber leg cannot exceed the lower of the original publication QoS and the broker-granted subscription QoS. Publishing the valve’s command at QoS 2 while its subscription is granted QoS 0 gives QoS 0 delivery on the subscriber leg. Inspect the subscription grant as well as the publisher’s setting.
QoS 1 permits duplicates, so the receiving application needs to handle a repeat safely. QoS 2 prevents duplicate protocol delivery on a completed MQTT leg; it does not prove that the valve acted exactly once. A permanent failure can still prevent delivery. Keep the final device result separate from proof of the packet exchange.
A QoS comparison calculator models missed MQTT-level transfers, elapsed time and battery energy. Its delivery totals depend on its retry and connection assumptions. Its timing and battery factors are not protocol guarantees, and ordinary Transmission Control Protocol (TCP) packet loss would usually be retransmitted. A model can explain tradeoffs; subscriber logs and measured recovery establish what a deployment did.
For the house, follow the evidence all the way to the receiver. Finding the saved subscription, receiving the queued command and observing the final command outcome answer different questions. None can stand in for all the others.