RabbitMQ
When to Use RabbitMQ
Recognise the workloads where a smart broker beats a log or a managed queue.
RabbitMQ is the right tool when you need flexible routing, low-latency task distribution, and rich per-message features — TTL, priorities, dead-lettering, and request/reply — with moderate throughput. Its smart-broker model means complex delivery logic lives in the broker, keeping producers and consumers simple.
RabbitMQ is a versatile postal sorting hub with every routing rule and special-handling service you could want — perfect for nuanced delivery, but not built to be a permanent archive (Kafka) or a hands-off outsourced mailroom (SQS).
Key Concepts
1
It is less suited to extreme throughput streaming or workloads that need to replay history, where Kafka is stronger: RabbitMQ deletes messages once acknowledged and is not designed as a long-term event store. Compared to SQS, RabbitMQ offers far richer routing and is self-hostable anywhere, but you must operate it (clustering, upgrades, monitoring) unless you use a managed offering.
2
Pick RabbitMQ for sophisticated routing and classic queueing; pick Kafka for streams and replay; pick SQS when you want zero ops on AWS and simple semantics.
3
What the interviewer is probing.
What the interviewer is probing.
4
1. "When is RabbitMQ a better fit than Kafka?" *Probing:* the comparison. *Stalls:* "It is
older." *Moves up:* complex routing, per-message acknowledgement, priority, delayed delivery, and
task queues where messages are consumed once.
1. "When is RabbitMQ a better fit than Kafka?"
5
2. "What does it not do well?" *Probing:* honesty. *Stalls:* "Nothing." *Moves up:* retained
replayable history and very high sustained throughput — queues are not a log.
2. "What does it not do well?"
6
3. "What is the operational profile?" *Probing:* the practical angle. *Stalls:* "Complex."
*Moves up:* simpler than Kafka for modest volume, but queue depth must be watched — an unbounded
queue will exhaust memory or disk.
3. "What is the operational profile?"
7
4. "Would you run both?" *Probing:* the architectural judgement. *Stalls:* "Never." *Moves up:*
often yes — Kafka for event streams and RabbitMQ for task dispatch, since they solve genuinely
different problems.
4. "Would you run both?"