kafka查看topic和消息内容命令

1、查询topic,进入kafka目录:
bin/kafka-topics.sh --list --zookeeper localhost:2181
 
2、查询topic内容:
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --from-beginning

猜你喜欢

转载自www.cnblogs.com/jylsgup/p/10247685.html