1. 程式人生 > >七 Kafka叢集安裝

七 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