Q: How to run kafka local
download kafka http://kafka.apache.org/downloads
start zookeeper
$ bin/zookeeper-server-start.sh config/zookeeper.properties
start kafka
$ bin/kafka-server-start.sh config/server.properties
or JMX_PORT=9988 bin/kafka-server-start.sh -daemon config/server.properties
start kafka producer
$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic topicName
start kafka consumer
$ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --from-beginning --consumer-property group.id=test-group
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topicName --consumer-property group.id=test-group
cat kafka-consumer-groups
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
describe kafka-consumer-group
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-group
describe topic
bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic topicName
delete topic
bin/kafka-topics.sh --delete --zookeeper localhost:2181 --topic topicName
run kafka local