Skip to content
StackDecode
System Design
9. Message Queues and Event-Driven SystemsAnimated

RabbitMQ

A flexible message broker with routing.

The idea

Exchanges route messages to queues by rules. Good for task queues and complex routing.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ProducerEvent brokerBillingEmailAnalytics
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

A service publishes an event: "OrderPlaced".

step:
1/4
at:
Producer
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Producer publishes to an exchange
  2. 2Bindings route it to queues
  3. 3Consumers pull and ack
  4. 4Failed messages go to a DLQ

Where it is used

Work queues and RPC.

Watch out for

Lower throughput than log-based systems for huge streams.

Related