Kafka uses ZooKeeper, so you need to first start a ZooKeeper server if you don't already have one. To list down all the topics, you can use the below command.
$ bin/kafka-topics.sh --list --zookeeper localhost:2181
Hope this will work
Join our Kafka course online today to become certified expert.