Skip to main content

Quality of Service

Three delivery guarantees, chosen per publish and per subscription:

  • QoS 0 — at most once. No acknowledgement.
  • QoS 1 — at least once. Held until PUBACK; may duplicate (DUP on redelivery).
  • QoS 2 — exactly once. PUBLISH → PUBREC → PUBREL → PUBCOMP.

The delivered QoS is the minimum of the publish QoS and the subscription QoS.

Retry & ordering

There is no in-connection retransmission timer. Unacknowledged QoS 1/2 messages are kept and re-sent with the DUP flag when a persistent session reconnects. On replay the broker sorts by packet identifier, which only approximates the original order; ordering is best-effort across reconnects and concurrent publishers.

Flow control (MQTT 5)

The client's Receive Maximum is currently parsed but not enforced — outbound QoS 1/2 concurrency is bounded only by the 65,535 packet-identifier space, not by the client's advertised Receive Maximum.