kafka 基本操作命令

sh bin/kafka-topics.sh --create --zookeeper xxxx:2181 --replication-factor 3 --partitions 20 --topic topicName

sh bin/kafka-console-producer.sh --broker-list xxxx:9092,xxxx:9092 --topic topicName
sh bin/kafka-console-consumer.sh --zookeeper xxxx:2181 --topic topicName --from-beginning

sh bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list xxxx:9092,xxxx:9092 --topic topicName --time -2

sh bin/kafka-consumer-groups.sh --bootstrap-server xxxx:9092,xxxx:9092 --describe --group groupId

 

posted on 2021-01-26 14:14  13rj1115  阅读(115)  评论(0编辑  收藏  举报

导航