w1100n
This site is best viewed in Google Chrome
5/7/2018 16:44

[code lang=shell]
./bin/kafka-server-start.sh config/server.properties

# create topic
bin/kafka-topics.sh –create –zookeeper test-zookeeper-1,test-zookeeper-2,test-zookeeper-3 –replication-factor 1 –partitions 1 –topic t0

查看所有topic
bin/kafka-topics.sh –list –zookeeper test-zookeeper-1,test-zookeeper-2,test-zookeeper-3

删除topic
bin/kafka-topics.sh –topic t0 –delete –zookeeper test-zookeeper-1

查看topic明细
bin/kafka-topics.sh –describe –zookeeper test-zookeeper-1,test-zookeeper-2,test-zookeeper-3 –topic t0

查看不可用分区 ./kafka-topics.sh –topic test –describe –unavailable-partitions –zookeeper

bin/kafka-console-producer.sh –broker-list test-kafka-1:9092 –topic t0
bin/kafka-console-consumer.sh –bootstrap-server test-kafka-1:9092 –topic t0 –from-beginning

[/code]

https://my.oschina.net/u/218540/blog/223501

<< Previous Posts Newer Posts >>
辽ICP备14012896