List all kafka topics

后端 未结 15 793
谎友^
谎友^ 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条回答
  • 2020-12-24 00:51

    Kafka requires zookeeper and indeed the list of topics is stored there, hence the kafka-topics tool needs to connect to zookeeper too. kafka-clients apis in the newer versions no longer talk to zookeeper directly, perhaps that's why you're under the impression a setup without zookeeper is possible. It is not, as kafka relies on it internally. For reference see: http://kafka.apache.org/documentation.html#quickstart Step 2:

    Kafka uses ZooKeeper so you need to first start a ZooKeeper server if you don't already have one

    0 讨论(0)
  • 2020-12-24 00:54

    Zookeeper is required for running Kafka. zookeeper is must. still if you want to see topic list without zookeeper then you need kafka monitoring tool such as Kafka Monitor Tool, kafka-manager etc.

    0 讨论(0)
  • 2020-12-24 00:56

    Kafka 2.2 and up

    Newer versions of Kafka no longer requires ZooKeeper connection string to list topics, but can directly go via the Kafka brokers. kafka-topics.sh is provided in the bin/ folder when downloading Kafka. To list topics, do the following:

    bin/kafka-topics.sh --list --bootstrap-server <BROKER-LIST>
    
    0 讨论(0)
提交回复
热议问题