查看topic列表
./kafka-topics.sh --list --zookeeper localhost:2181
查看topic信息
./kafka-topics.sh --zookeeper localhost:2181 --describe --topic 主题名称
修改topic分区数量
./kafka-topics.sh --zookeeper localhost:2181 --alter --topic 主题名称 --partitions 分区数量
查看topic消息
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic 主题名称 --from-beginning
查看分区offset
./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhsot:9092 --topic 主题名称