七 Kafka集群安装

2、Kafka集群安装
1)修改配置文件config/server.properties
2)启动服务器bin/kafka-server-start.sh config/server.properties &
3)测试
创建topic
bin/kafka-topics.sh --create --zookeeper localhost:2181/kafka --replication-factor 3   --partitions 1 --topic  test
查看topic
bin/kafka-topics.sh --describe --zookeeper  localhost:2181/kafka   --topic  test
查看生产
bin/kafka-console-producer.sh --broker-list 192.168.10.155:9092 --topic test
查看消费
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

猜你喜欢

转载自blog.csdn.net/xsjzdrxsjzdr/article/details/85618713
今日推荐