From the course: Complete Guide to Apache Kafka for Beginners

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Kafka console producer CLI

Kafka console producer CLI

Hi, this is Stephane from Conduktor and in this lecture we're going to practice using the Kafka console producer to start producing data into our Kafka topics. So we're going to practice two use cases. We're going to practice without sending key. So the key will be null and the data will be distributed across all partitions. Or we can produce with keys to have the same key always go to the same partition. So let's have a look right now. So let's practice using the Kafka console producer for this. Go into your code and open the file name one Kafka console producer. So again, we'll run the same commands both on conductor platform and localhost. They're very similar. So first things first. If you don't have any topics, which I don't right now, I will go ahead and create my first topic with one partition and we use one partition to demonstrate a special behavior. I will let you know later. So my topic first topic is now created and the next thing we have to do is to produce to it. For…

Contents