http://www.cnblogs.com/wxisme/p/5196302.html
vim config/server.properties
broker.id(标示当前server在集群中的id,从0开始);port;host.name(当前的server host name);zookeeper.connect(连接的zookeeper集群);log.dirs(log的存储目录,需要提前创建)。
http://www.cnblogs.com/wxisme/p/5196302.html
启动zk
zkServer.sh start
启动kafka
./bin/kafka-server-start.sh config/server.properties &
创建topic
bin/kafka-topics.sh -zookeeper localhost:2181 -topic test -replication-factor 1 -partitions 3 -create
查看topic
./bin/kafka-topics.sh -zookeeper localhost:2181 -list
创建producer
./bin/kafka-console-producer.sh -broker-list localhost:9092 -topic test
https://yaohuangportal.wordpress.com/2014/06/24/kafka-console-producer-sh-kafka_2-10-0-8-1-reported-slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder/
创建consumer
./bin/kafka-console-consumer.sh -zookeeper localhost:2181 - from-begining -topic test