Kafka

Creating a Kafka topic

Creating a Kafka topic

 

To create one or more topics on the server, you can use the following command - 

kafka-topics.sh

Now open a new terminal and type the below syntax -

 

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 

--partitions 1 --topic topic-name

 

You can choose the topic name as ‘Hello Kafka.’

The output will be shown as - Created topic Hello-Kafka