Skip to content

Instantly share code, notes, and snippets.

View vikram-bais's full-sized avatar

Vikram Bais vikram-bais

View GitHub Profile

Explaining Kafka Producer’s internal working, configurations, idempotent behavior and safe producer

In this blog, we deep-dive into Kafka producer’s architecture, its components, and configurations to help you understand the concept of Idempotent producer. We also discuss the notion of a safe producer and how it helps improve the performance of Kafka producer.

Let’s start by learning about the internal architectures of the Kafka producer and the various components involved in sending/delivering the messages to the Kafka broker (topic -partition).

Kafka Producer Architecture and Workflow

Components of Kafka Producer -

  • Send()- It adds the record to a buffer of pending records to be sent and returns immediately. This buffer of pending records helps to batch together individual records for efficiency.