An IoT broker sits between a fleet of publishing sensors and a slower downstream consumer (a stream processor, a database writer). When publishers produce faster than the consumer can drain, messages pile up in a bounded buffer:
fillRatio = queueDepth / capacity
throttle = 1 if fillRatio ≤ watermark
throttle = max(0.05, 1 - (fillRatio-watermark)/(1-watermark)) if fillRatio > watermark
effectivePublishRate = rawPublishRate × throttle
queueDepth += effectivePublishRate·dt - min(consumeRate·dt, queueDepth)
if queueDepth would exceed capacity: excess is dropped, queueDepth clamped to capacity
This is the exact shape of backpressure in real edge-messaging systems (MQTT brokers, Kafka partitions, AWS IoT Core rules): once the buffer crosses a high-watermark, the broker signals publishers to slow down (throttling) rather than let the queue grow unbounded. If producers still outpace the drain rate even while throttled, the buffer hits capacity and starts dropping messages outright.
- Sensor publish rate — raw messages/sec the fleet tries to push into the broker before any throttling.
- Consumer throughput — messages/sec the downstream consumer can actually drain from the buffer.
- Buffer capacity — the hard limit on buffered messages; exceeding it means data loss.
- Backpressure watermark — the fill percentage above which the broker linearly throttles publishers back toward zero as the buffer approaches full.
Push the publish rate well above the consumer throughput and watch the buffer climb, the sensor ring shift color as throttling engages, and — if the watermark is set too high or throttling isn't enough — messages start being dropped instead of queued.