Damián Pumar

← Back to blog

Published on May 11, 2024 by Damián Pumar

RabbitMQ in 5 minutes

Rabbitmq is an open source messaging broker that allows applications to communicate with each other asynchronously.

Producing and Consuming

In RabbitMQ, there are two main roles:

Queues

A queue is a buffer that stores messages sent by producers and waits to be processed by consumers. Queues are the basic unit of storage in RabbitMQ.

Exchanges

An exchange is the component that receives messages from producers and sends them to the appropriate queues. Exchanges are like “distribution hubs” that direct messages to the correct queues.

Types of Exchanges

There are four types of exchanges in RabbitMQ:

Bindings

A binding is the relationship between a queue and an exchange. Bindings define how messages are sent from the exchange to the queue.

Routing Key

The routing key is a string used to determine which queue to send the message to. Producers specify the routing key when sending a message.

Message Acknowledgement

When a consumer processes a message, it must send an acknowledgement to RabbitMQ to indicate that the message has been processed successfully. If the consumer fails before processing the message, RabbitMQ re-sends the message to the queue.

Other Concepts

Hope you like it, see you in the next post 👋

Bye 🙌

Written by Damián Pumar

Something wrong? Let me know 🙏

← Back to blog