Producer

This lesson explains how Kafka producers write messages to topic partitions.

We'll cover the following...

Producers write messages to Kafka that can then be consumed by readers. We’ll take a detailed look at how messages get written to Kafka in this lesson.

Write workflow

The steps involved are:

  1. An object of class ProduceRecord is instantiated which must contain the intended topic of the message and the message itself, which is the value. The message key and partition can optionally be included.

  2. Next, the key and values to be sent over the network are serialized. At this point, a ...