TBMQ Lite (beta): a self-contained MQTT broker with zero external dependencies
776 Try for free Menu

TBMQ live demo

Try TBMQ in your browser

A free account on our public broker. Open the TBMQ UI and connect your MQTT clients. No credit card required.

Rather run it yourself? Install on your own servers

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load the site search from Google. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics).

Remember the campaign or partner link you arrived from, so we know which campaign or partner brought you when you sign up or contact us (partner program). We do not use it to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

MQTT GUIDE

2 min read

MQTT Flow Control and Receive Maximum

Quick answer

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.

Client Broker PUBLISH 1 PUBLISH 2 PUBLISH 3 3 in flight window full — Receive Maximum = 3 (example) — client waits PUBACK 1 PUBLISH 4 slot freed
Flow control caps unacknowledged messages in flight — the sender pauses when the window is full

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.