Queue backlog age: alerting on the oldest message, not just depth
A queue absorbs bursts so producers stay fast. Backlog age — how long the oldest message has waited — tells you whether the work is still getting done in time.
What causes it
Depth alone is misleading: 10,000 messages is fine if consumers clear them in seconds, and terrible if they take an hour. When producers outpace consumers for a sustained period, the oldest message ages steadily and anything time-sensitive (emails, payments, notifications) arrives late.
How to recognise it
- SQS ApproximateAgeOfOldestMessage rising
- Consumers at full utilisation
- Users reporting delayed emails or notifications
The math
Time to drain = backlog ÷ (consume rate − publish rate)
How to fix it
- Add consumers
- Increase consumer concurrency
- Alert on message age, not just depth
Reproduce it in the simulator
These templates trigger this failure on purpose:
Scale-upAsync pipeline
API Gateway → Lambda → SQS → workers → DynamoDB. A traffic spike hits at 20 s.
Learn more
Part of the guide Message queues vs event streams.