用户工具

站点工具


cmd:kafka

这是本文档旧的修订版!


Kafka Shell基本命令(包括topic的增删改查)

创建 topic

bin/kafka-topics.sh --create --zookeeper zookeeper:2181 --topic test_topic --partitions 2 --replication-factor 1

查看所有 topic 列表

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

查看指定 topic 信息

bin/kafka-topics.sh --zookeeper zookeeper:2181 --describe --topic test_topic

控制台消费 topic 的数据

bin/kafka-console-consumer.sh  --zookeeper zookeeper:2181  --topic test_topic --from-beginning
cmd/kafka.1603521911.txt.gz · 最后更改: 2020/10/24 14:45 由 plough

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki