You are on page 1of 2

RabbitMQ

RabbitMQ is an open-source message broker, widely used for Event-driven systems. It was
designed to follow the AMQP 0-9-1 standard, but now supports multple protocols (STOMP,
HTTP and others).

Key concepts
Broker
The RabbitMQ service. It contains exchanges and queues. It is generally clustered for high
availability. Unlike a Kafka > Broker, which is intentionally kept simple, RabbitMQ's approach
is to centralize much of the delivery logic inside the broker.

By default, it will round-robin available consumers, regardless or their load. This behaviour can
be replaced with a more balanced approach by configuring prefetch options. In this case,
consumers will be considered busy once their prefetch limit has been reached, and the message
will be delivered to the next available consumer.

Exchange
Exchanges are entry points at the broker. AMQP supports multiple exchange types for a variety
of use cases. Messages are always sent to an exchange before they are delivered to a queue.
Exchanges are bound (linked) to N queues. Messages last only until consumers acknowledge
them.

Fanout Exchange
Delivers the message to every bound queue.

Direct Exchange

Messages are routed only to the queue specified in the payload's routing key.

Topic Exchange

Routes to every destination matching the routing key (e.g. a police-officer-* key will route
the message to every police officer, but not to any firefighters if their queue names are prefixed
by firefighter- ).

Header Exchange
A more powerful version of the Topic Exchange that allows specification of multiple conditions
for pattern matching (and whether all or some of them must be true for delivery).

Consumer
Reads and acknowledges messages.

Producer
Sends messages to the broker.

Queue
A FIFO queue of messages.

References:
https://www.youtube.com/watch?v=nFxjaVmFj5E

https://www.youtube.com/watch?v=Cie5v59mrTg

You might also like