There are lots of configuration parameters for the Kafka Producer API using which we can tune our applications as per requirements. The performance and reliability of our Kafka Producer applications depend a lot on how we configure these parameters. Let’s explore some of the most important ones. In the process, we will also cover some of the best practices of the Producer API.

Common configurations

Let’s take a look at some of the commonly used Producer API configurations.

The bootstrap.servers configuration

This is simply a comma-separated list of Kafka broker addresses that the producer should use to establish an initial connection. For example, we use localhost:9092 as the value in this case.

Get hands-on with 1200+ tech skills courses.