2022-11-24
2310
#node
Rishabh Rawat
143530
Nov 24, 2022 â‹… 8 min read

Build a durable pub-sub with Kafka in Node.js

Rishabh Rawat Rishabh is a full-time Software Engineer, GSoC '19 participant, and GCI '18 mentor. He writes about backend web development biweekly. Find him on Twitter and LinkedIn.

Recent posts:

JavaScript icon over teal background.

JavaScript scroll snap events for scroll-triggered animations

Learn how to use JavaScript scroll snap events for dynamic scroll-triggered animations, enhancing user experience seamlessly.

Abiola Farounbi
Jan 2, 2025 â‹… 7 min read

Understanding deep linking in React Native

A comprehensive guide to deep linking in React Native for iOS 14+ and Android 11.x, including a step-by-step tutorial.

Eugene Hauptmann
Dec 31, 2024 â‹… 9 min read
React logo over lavender background

How React 19 can help you make faster websites

Explore React 19’s new features, including the compiler, automatic memoization, and updates to hooks like use() and useFormStatus.

Emmanuel Odioko
Dec 31, 2024 â‹… 12 min read
Building A Multi-Lingual Web App With Nuxt 3 And Nuxt i18n

Building a multi-lingual web app with Nuxt 3 and Nuxt i18n

Create a multi-lingual web application using Nuxt 3 and the Nuxt i18n and Nuxt i18n Micro modules.

Emmanuel John
Dec 30, 2024 â‹… 9 min read
View all posts

8 Replies to "Build a durable pub-sub with Kafka in Node.js"

  1. >This helps in replaying or resyncing your applications and certain operations

    I tend to disagree, as complex applications involve integrations with 3p services, and replaying events might cause inconsistencies on those services if invoked multiple times (in longer periods of time). Events which represent business facts should be handled, processed and consumed only once. However, I agree on the auditing part, but in a distributed, service-oriented architecture, that should be framed as a proper service.

    1. Yes, replaying the events is only possible when all of the external services or vendors have idempotent APIs.

      Absolutely. Replaying Kafka events should not be a go-to for compensating request failures. If unexpected failures happen frequently, the API design needs to be relooked at.

  2. Hi, i am getting below issue after running first command..

    Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

Leave a Reply