main

2020/11/05

three message brokers: redis, kafaka and RabbitMQ

There are three popular asynchronous message brokers: Redis, Kafaka and RabbitMQ. When we want to handle asynchronous message, we use message broker to handle the data. The message broker is kind of post office. Somebody drops the mail(message) in the office. Post office will deliver those mails based on the mailing address(routing) to its receipt. 

In a Synchronous communication, the caller waits for a response before sending the next message, and it operates as a REST protocol on top of HTTP. On the contrary, in an Asynchronous communication the messages are sent without waiting for a response. This is suited for distributed systems, and usually requires a message broker to manage the messages.

There are three parameters to consider: broker scale, data persistency and consumer capability. 

RabbitMQ: 

Scale: based on configuration and resources, the ballpark here is around 50K msg per second.

Persistency: both persistent and transient messages are supported.

One-to-one vs one-to-many consumers: both.


Kafaka:

Scale: can send up to a millions messages per second.

Persistency: yes.

One-to-one vs one-to-many consumers: only one-to-many (seems strange at first glance, right?!).


Redis:

Scale: can send up to a million messages per second.

Persistency: basically, no – it’s an in-memory datastore.

One-to-one vs one-to-many consumers: both.


Some Information above is take from the following article:


https://otonomo.io/blog/redis-kafka-or-rabbitmq-which-microservices-message-broker-to-choose/

No comments:

Post a Comment

How to Supercharge Your Python Classes with Class Methods

  How to Supercharge Your Python Classes with Class Methods | by Siavash Yasini | May, 2024 | Towards Data Science As we just mentioned, a c...