List all kafka topics

后端 未结 15 865
谎友^
谎友^ 2020-12-24 00:13

I\'m using kafka 0.10 without zookeeper. I want to get kafka topics list. This command is not working since we\'re not using zookeeper: <

15条回答
  •  猫巷女王i
    2020-12-24 00:41

    You need to start the zookeeper server first. So first go to kafka/bin/windows and run

    zookeeper-server-start.bat ../../config/zookeeper.properties
    

    then in the same folder with a new cmd windows start the kafka servers by running

    kafka-server-start.bat ../../config/server.properties
    

    Note: if you starting it for the first time then there are certain changes to be made in these files

    then inside kafka/bin/windows run

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

    to list down all the topics existing.

提交回复
热议问题