Загрузка...

Day 12/31-365 follow for more such content. #fyp #tech #explore #learn #viral #trending #like #code

Day 12/31-365 follow for more such content.
.

-In our microservices architecture we used Apache Kafka for event-driven communication between services.

For example, when a user completes a transaction, the Order service publishes an event to Kafka. Multiple services like Notification, Analytics, and Audit consume the same event asynchronously without impacting the main transaction flow.
.
Interviewer: Why not use MQ?
.
You:
Traditional MQ systems like RabbitMQ or IBM MQ follow a queue-based model, where normally one consumer processes one message and the message is removed from the queue.
But our requirement was different:
1️⃣ Multiple services needed the same event:
Order event had to be consumed by Analytics, Notification, and Audit services simultaneously.
With MQ, this requires complex fan-out configuration, but Kafka naturally supports multiple consumers via consumer groups.
2️⃣ Event replay requirement:
Sometimes we needed to reprocess historical events for analytics or debugging.
MQ deletes messages once consumed, but Kafka retains events for a configured time, allowing replay.
3️⃣ Very high event volume:
Our system generated a large number of events, and Kafka handles high throughput using partitioned topics, which scales better.
4️⃣ Loose coupling:
Kafka allows services to consume events independently at their own speed using offsets, while MQ is more queue-processing oriented.
.

So MQ could handle simple queue-based messaging, but since our system needed event streaming, message retention, and replay capability, Kafka was a better fit.
.
#fyp #explore #tech #viral #trending

Видео Day 12/31-365 follow for more such content. #fyp #tech #explore #learn #viral #trending #like #code канала Black Cask
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять