How Do You List the Kafka Topics when You Cannot Find the kafka-topics.sh File?

Problem scenario
You cannot find kafka-topics.sh. But you want to list the Kafka topics. What should you do?

Solution
Find the kafka-topics binary file. Use something like this (but replace "localhost" with the server name of Zookeeper and "2181" with the TCP port number):

kafka-topics --list --zookeeper localhost:2181

(This was adapted from https://stackoverflow.com/questions/44405663/list-all-kafka-topics.)


Leave a comment

Your email address will not be published. Required fields are marked *