From the course: Apache Kafka Essential Training: Getting Started (2021)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Publishing messages to topics

Publishing messages to topics

From the course: Apache Kafka Essential Training: Getting Started (2021)

Start my 1-month free trial

Publishing messages to topics

In this video, I will demonstrate publishing of messages to Kafka using the command line publisher. For this, we will use the Kafka console producer.sh shell script. In order to publish, we need to provide the bootstrap server parameter, which can point to a list of Kafka brokers, we provide localhost 29092 as the value. As explained in the earlier setup video, we need to pay attention to the URL used. We are running this command from inside the container, which is within the Docker network. So we will need to use an internal host and port as the host of the same container. We can use localhost, the port should be the internal port, which is 29092, we need to specify the topic to which we are publishing data. There are other optional parameters available, which you can explore by simply using the shell script without any parameters. let's publish some data now. Let me just provide the shell script name,…

Contents