Kafka Consumer and producer

Let's first start the zookeeper.
open a new command window, and run the following command.
zookeeper-server-start %KAFKA_HOME%\config\zookeeper.properties
zookeeper by default, starts at port 2181.
Apache Kafka server start

start the kafka server.
open a new command window, and run the following command.
kafka-server-start %KAFKA_HOME%\config\server.properties
Zookeeper server start

create a topic called hello-topic with 4 partitions and replication factor of 1.
open a new command window, and run the following command.
kafka-topics --create --topic hello-topic --partitions 4 --replication-factor 1 --zookeeper localhost:2181
Apache Kafka topic creation
start a kafka console producer to send messages to the topic
kafka-console-producer --topic hello-topic --bootstrap-server localhost:9092
start a kafka console consumer to receive messages from the topic
kafka-console-consumer --topic hello-topic --bootstrap-server localhost:9092
Start typing messages in producer and it will reach to consumer. Apache Kafka Console producer window