:quick start
http://kafka.apache.org/documentation.html#quickstart
:修改kafka zk配置config/zookeeper.properties
dataDir=G:/Big-File/Architecture/storm/kafka_2.10-0.9.0.0/zookeeper
:启动zk
cd G:\Big-File\Architecture\storm\kafka_2.10-0.9.0.0
bin\windows\zookeeper-server-start config/zookeeper.properties
:修改kafka配置config/server.properties
log.dirs=G:/Big-File/Architecture/storm/kafka_2.10-0.9.0.0/kafka-logs
num.partitions=1
:启动kafka
bin\windows\kafka-server-start config/server.properties
:创建主题
bin\windows\kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
:查看主题
bin\windows\kafka-topics --list --zookeeper localhost:2181
:发送消息
bin\windows\kafka-console-producer --broker-list localhost:9092 --topic test
:接收消息
bin\windows\kafka-console-consumer --zookeeper localhost:2181 --topic test --from-beginning
:查看主题信息
bin\windows\kafka-topics --describe --zookeeper localhost:2181 --topic test