List all kafka topics

后端 未结 15 816
谎友^
谎友^ 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:34

    Commands:

    1. To start the kafka:

      $ nohup ~/kafka/bin/kafka-server-start.sh ~/kafka/config/server.properties > ~/kafka/kafka.log 2>&1 &

    2. To list out all the topic on on kafka;

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

    3. To check the data is landing on kafka topic and to print it out;

      $ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic your_topic_name --from-beginning

提交回复
热议问题