运行zookeeper
docker run -itd --name zookeeper -h zookeeper -p 2181:2181 akin520/zookeeper:3.4.6
运行kafka集群
docker run -itd --name kafka10 -h kafka10 -p 9092:9092 -e BROKER_ID=10 -e BROKER_PORT=9092 --link zookeeper akin520/kafka_multi:0.8.2.2
docker run -itd --name kafka11 -h kafka11 -p 9093:9093 -e BROKER_ID=11 -e BROKER_PORT=9093 --link zookeeper akin520/kafka_multi:0.8.2.2
docker run -itd --name kafka12 -h kafka12 -p 9094:9094 -e BROKER_ID=12 -e BROKER_PORT=9094 --link zookeeper akin520/kafka_multi:0.8.2.2
bin/kafka-topics.sh --zookeeper zookeeper:2181 --topic topic1 --create --partitions 3 --replication-factor 2
bin/kafka-topics.sh --zookeeper zookeeper:2181 --topic topic1 --describe
http://blackproof.iteye.com/blog/2223876
阅读(2291) | 评论(0) | 转发(0) |