Kafka

Get a list of Topics

Get a list of Topics

You can use the following syntax to get a list of Topics in the Kafka server -

 

bin/kafka-topics.sh --list --zookeeper localhost:2181

 

The output will be displayed as -

 

Hello-Kafka

 

(As we created only one topic with this name, you will get this topic name as the output.)