MQTT GUIDE
2 min readMQTT Flow Control
MQTT 5.0 flow control uses the Receive Maximum property: each side tells the other how many QoS 1 and QoS 2 messages it will accept without acknowledgement at once. The sender stops when that many are in flight and resumes as acknowledgements arrive, so a fast sender can’t overwhelm a slower receiver.
A fast publisher can send messages quicker than a slow consumer can handle them. MQTT 5.0 adds flow control so the receiver can push back — capping how many unacknowledged messages the sender may have in flight at once.
How flow control works
At connect, each side advertises a Receive Maximum: the number of QoS 1 and QoS 2 messages it is willing to have outstanding without acknowledgement. The sender may keep sending until that many are unacknowledged, then it must wait. As each PUBACK (or PUBCOMP for QoS 2) arrives, a slot frees up and the sender can send another. QoS 0 messages aren’t acknowledged, so they don’t count.
Flow control in TBMQ
TBMQ enables flow control and advertises a Receive Maximum of 1000, so a client may have up to 1000 unacknowledged QoS 1/2 publishes in flight to the broker before it must wait for acknowledgements. (The diagram uses 3 just to make the window easy to see.) See the MQTT protocol guide for supported 5.0 features.
Frequently asked questions
What is MQTT flow control?
A mechanism in MQTT 5.0 that limits how many unacknowledged QoS 1 and QoS 2 messages can be in flight at once. Each side advertises a Receive Maximum; the sender must pause once that many messages are awaiting acknowledgement, and resume as acknowledgements come back.
What is Receive Maximum?
The MQTT 5.0 property that carries the flow-control limit. When a receiver advertises Receive Maximum = N, the sender may have at most N unacknowledged QoS 1/2 PUBLISH packets outstanding to it at any moment.
Does flow control apply to QoS 0 messages?
No. QoS 0 messages are never acknowledged, so they are not counted against Receive Maximum. Flow control only governs QoS 1 and QoS 2 traffic.
Why does flow control matter?
It stops a fast sender from overwhelming a slower receiver. Without a bound, a burst of publishes could exhaust a constrained client’s memory or buffers; Receive Maximum applies natural backpressure instead.
Is flow control available in MQTT 3.1.1?
Not as an explicit protocol feature. MQTT 3.1.1 has no Receive Maximum, so any in-flight limits were broker- or client-specific rather than negotiated. MQTT 5.0 standardizes it.
Run it yourself
TBMQ is a free, open-source MQTT broker built to scale. Spin it up in minutes or try the live demo — no install required.