RabbitMQ · senior
RabbitMQ resource alarms and blocked publishers
When RabbitMQ runs low on memory or disk, it blocks publishers across the cluster. A backlog in one queue can stop unrelated services, such as checkout.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Resource alarms (memory high watermark and free disk limit) are cluster-wide. When one node crosses its limit, every connection that publishes is blocked until the alarm clears. Consuming continues. An email backlog that fills the disk can block checkout if checkout publishes to the same cluster.
- If the order service publishes inside the HTTP request with no timeout, request threads wait and checkout hangs.
- Take pressure off: free disk quickly (move the backlog with a shovel, drop low-value messages with business approval, add disk), and let checkout continue with an outbox table instead of publishing in the request.
- Limits on bulk queues: max-length or max-length-bytes with overflow reject-publish and a dead-letter exchange, or drop-head for disposable messages. Use a TTL for messages that are worthless after a day.
- Keep bulk and critical traffic on separate clusters, or at least behind limits. Use separate connections for publishing and consuming, because blocking a shared connection also holds up its consumers.
- Consumers should stop pulling while a provider is down (a circuit breaker) instead of requeueing in a loop. Alert on queue depth and growth rate, disk and memory headroom, and blocked connections.
The red pen
Common traps: mistake → fix
Mistake: Restart RabbitMQ to fix a hang
Fix: the backlog and alarm remain.
Mistake: Raise the watermark or lower the disk limit
Fix: it only delays the failure.
Mistake: Purge every queue
Fix: it deletes work without asking.
Easy to hard
Questions interviewers ask, easy to hard
- Checkout hangs because the email provider was down. Why?
- What is a RabbitMQ resource alarm?
- How do you stop a bulk queue from taking down critical traffic?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.