1.常见命令
1.创建topickafka-topics.sh --create --bootstrap-server node1:9092 --topic test2.查询所有的topickafka-topics.sh --list --bootstrap-server node1:90923.查看主题的详情信息kafka-topics.sh --describe --bootstrap-server node1:9092 --topic test4.命令终端执行发送消息kafka-console-producer.sh --broker-list node1:9092 --topic test5.消费队列数据(控制台打印不包括之前数据)kafka-console-consumer.sh --bootstrap-server node1:9092 --topic test6.增加分区kafka-topics.sh --bootstrap-server node1:9092 --alter --topic test --partitions 87.注意的是--zookeeper 和bootstrap-server同效kafka-topics.sh --describe --zookeeper node1:2181 --topic test8.删除topic kafka-topics.sh --zookeeper node1:2181 --delete --topic test
2.压测
kafka-topics.sh --zookeeper node1:2181 --create --topic benchmark --partitions 1 --replication-factor 1