RabbitMQ can scale up to around 50,000 messages per second.
It is less than Apache Kafka and Redis Pub/Sub. But there are some advantages of rabbitMQ over these two.
You can’t schedule messages in Apache Kafka and Redis Pub/Sub.
Message scheduling was a major use case, so I used rabbitMQ over Kafka and Redis.
Let’s deep dive into RabbitMQ.
You can’t publish messages directly to the queue.
Queue binds to the exchange.
Queue recoring_queue bind with exchange video.direct.exchange
You have to publish messages to exchange and exchange push messages to respective queues.
Exchange: Exchanges take a message and route it into zero or more queues. The routing algorithm used depends on the exchange type and rules called bindings.
There are various types of exchange types.
- Direct Exchange: A direct exchange delivers messages to queues based on the message routing key.
Process :