Back to Notes
February 16, 2024

Messaging Communication Among Services With Kafka

Kafka intro.


Knowing about Publish and Subscribe

Communication methods among services can be achieved directly and indirectly.

Using Pub/Sub has an advantage below:

The publisher services don’t need to have any complexity about how the informations they sent used, they just have to know that the data is successfully stored in the Message Broker.

If we’re using direct communication, when we got new applications or services that have to work with the related data, the producer of the resource has to adjust about sending the data, it has to think who has gonna receive the information, and this process of adjustment will happen every any brand new service that needs the data.

Pub/Sub DiagramPub/Sub Diagram Otherwise, with messaging communication method we can make sure when there’s any new brand service comes to consume the related data, the producer of the data doesn’t need take extra action, it will be as it is, just let the data sent into the Message Broker.

Therefore, besides the advantage of reducing complexity above, we have to consider about the Pub/Sub disadvantages:

Introduction to Kafka

Kafka is one of the popular Message Broker applications out there, it has a dozen of users. With its Apache 2.0 licence we can use Kafka for personal or even commercial purposes for free. There are few reasons why Kafka is the best choice: