Prefetch — how many in flight per worker
Prefetch caps how many un-acked messages a single worker holds in flight: too low starves throughput on network round-trips, too high lets one greedy worker hoard the queue while siblings idle.
Each grey cell has its own countdown — and the broker is happy to hand a worker more than one. How many it hands out per worker is its own knob, and it has its own symmetric failure modes.
Scene 09a
Prefetch — how many in flight per worker
- Watch
- Try it
- Predict
- Capture
Watch the two extremes side by side. Prefetch = 1: each worker holds one message at a time — bars are perfectly even but modest, because every fetch pays a network round-trip. Then prefetch jumps to unbounded — one worker grabs the whole visible queue and the other three sit flat. Same workers, same queue, same job — the only thing that changed is the prefetch cap.
Where this sits in Build a Message Queue (RabbitMQ / SQS)
Scene 09a of 14. Per-worker cap on un-acked in-flight messages. Too low → throughput collapse on RTT; too high → one greedy worker hoards.
Up next. Now we have throughput tuned. But every scene so far implicitly assumed order doesn't matter — workers race for the head. What if order does matter? Then competing consumers and FIFO start to fight each other.
All 14 scenes in Build a Message Queue (RabbitMQ / SQS) · Every curriculum