From the course: Apache Kafka Essential Training: Getting Started

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Producers and consumers

Producers and consumers

- [Instructor] A producer is any client that publishes data to Kafka. Some examples include web servers that push web click events, a log scrubber pushing in log messages, and a sensor pushing in telemetry data. To build a producer, a developer needs to use a Kafka client library within their code and publish data. Such client libraries are available for multiple programming languages. Please check the Kafka website for more details. We will discuss Java client libraries in this course. There can be multiple concurrent producers for each topic. These producers can be different physical processes or threats in the same process. It is the job of the producer to identify the key for the message. Typical keys would include customer IDs, product IDs, or transaction IDs. Please note that the keys influence partition selections. Ideally, distinct values for these keys should have equal distribution to ensure equal load…

Contents