Queue backlog, poison messages and safe redrive
medium 6 minQueue depth counts outstanding messages, while oldest age tells you how long some work has waited.
Video lesson · Chapter 1 of 4
A queue grows even after traffic normalizes
Theory
Read or listen first. About 1 min.
What it is
Queue depth counts outstanding messages, while oldest age tells you how long some work has waited. In a simple steady interval, backlog shrinks only if successful completions exceed incoming work. Retries consume capacity and may deliver an operation more than once. A redrive must preserve the logical operation’s identity.
Why it exists
A consumer repeatedly fails one malformed message. If arrivals are 80 jobs/s and successful capacity is 100 jobs/s, draining 2400 eligible jobs takes about two minutes at a net 20/s. That estimate fails when retries or ordering block useful completions. Isolate repeat failures, repair the consumer and replay a bounded sample while checking for duplicate effects.
If eligible backlog falls while oldest age grows, examine stranded groups or repeat failures rather than scaling all consumers.
A queue grows even after traffic normalizes
How it works
Step through the idea, or press Play.
Baseline. The oldest eligible job waits one minute.
Understand it
Worked incident
A queue grows even after traffic normalizes
| Observation | Oldest pending age (min) | Interpretation |
|---|---|---|
| Baseline | 1 | The oldest eligible job waits one minute. |
| Incident | 24 | Retries consume worker slots and age reaches 24 minutes. |
| After intervention | 3 | Quarantine the failing input, validate idempotent handling and redrive gradually while age falls. |
Choose the next investigation
Summary
The whole topic in one minute.
Arrivals and failed attempts both matter. Only net successful drain reduces the waiting work.
If eligible backlog falls while oldest age grows, examine stranded groups or repeat failures rather than scaling all consumers.