export KAFKA_HOME=/home/xhr/kafka_2.10-0.8.2.2
export PATH=$PATH:$KAFKA_HOME/bin
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
#bin/kafka-topics.sh --create -zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic kafkatopic
bin/kafka-topics.sh --list -zookeeper localhost:2181
bin/kafka-console-producer.sh -broker-list localhost:9092 --topic kafkatopic
bin/kafka-console-consumer.sh -zookeeper localhost:2181 --topic kafkatopic --from-beginning
阅读(2157) | 评论(0) | 转发(0) |