Kafka
查看所有Topic
bin/kafka-topics.sh --zookeeper localhost:2181 --list
查看Topic详情
bin/kafka-topics.sh --zookeeper localhost:2181 --topic test --describe
手动创建Topic
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 3 --topic test
启动生产者
./kafka-console-producer.sh --broker-list localhost:9092 --topic test
启动消费者
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic test
Zookeeper
进入zkCli shell
bin/zkCli.sh -server localhost:2181
删除某topic path
rmr /broker/topic/{topicname}
查看zk角色
bin/zkServer.sh status