The poison message — the loop that won't end
A naive requeue-on-failure loop turns one un-processable message into an infinite redelivery storm that pegs the workers' CPU and blocks every healthy message behind it.
Requeue tries again. But some messages cannot succeed — malformed JSON, a deleted referenced row, a schema rollover. The strip oscillates forever on those cells, and we just watched the CPU bill climb.
Scene 07
The poison message — the loop that won't end
- Watch
- Try it
- Predict
- Capture
One red cell at the head is a poison message — it always throws when processed. Watch the workers grab it, fail, and nack-requeue. The cell returns to the head with delivery-count + 1. The badge climbs; the CPU meter pegs; the healthy cells behind it never move.
Where this sits in Build a Message Queue (RabbitMQ / SQS)
Scene 07 of 14. A naive requeue loop turns one un-processable message into an infinite redelivery storm that pegs CPU and starves the queue behind it.
Up next. The fix has to live in the broker, not the consumer: after the delivery-count badge hits some threshold, the broker should route this message somewhere it cannot poison the main pool.
All 14 scenes in Build a Message Queue (RabbitMQ / SQS) · Every curriculum