- Start kafka:
-
./kafka-server-start.sh ../config/server.properties 1>/dev/null 2>&1 & # kafka-server-start.sh script is under kafka_2.12-2.2.0/bin
- View the list of created topics:
- ./kafka-topics.sh --list --zookeeper localhost:2181
- View the description information of the corresponding topic:
-
./kafka-topics.sh --describe --zookeeper xx.x.xxx.xxx:2181 --topic xxxxx.xx.xxxxx.xxx # --zookeeper is zookeeperIP, --topic is topic name
- Consumer news:
-
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic xxxxx.xx.xxxxx.xxx --from-beginning # If there is no return or no response, then there is no data content in the topic; otherwise Just have data
View topic data of kafka
Guess you like
Origin blog.csdn.net/AntdonYu/article/details/107351470
Recommended
Ranking