Running Apache Kafka in Windows
Windows Kafka Setup steps:
1) Download Kafka and unzip.
2) Start Zookeeper:
1) Download Kafka and unzip.
2) Start Zookeeper:
kafka_2.10-0.8.2.1\bin\windows\zookeeper-server-start.bat tools\kafka_2.10-0.8.2.1\config\zookeeper.properties3) Start Kafka Server
kafka_2.10-0.8.2.1\bin\windows\kafka-server-start.bat tools\kafka_2.10-0.8.2.1\config\server.properties4) List topics, to make sure Kafka is up and running
kafka_2.10-0.8.2.1\bin\windows\kafka-topics.bat --list --zookeeper localhost:21815) Create new Topic, examples:
kafka-topics.bat --create --topic sensor1 --replication-factor 1 --zookeeper localhost:2181 --partition 56) Produce some sample Kafka Messages:
kafka_2.10-0.8.2.1\bin\windows\kafka-console-producer.sh --broker-list localhost:9092 --topic sensor16) Consumer to Test whether above produced messages are successfully published to Kafka broker:
kafka_2.10-0.8.2.1\bin\windows\kafka-console-consumer.bat --zookeeper localhost:2181 --topic sensor1 --from-beginning7) Stop Kafka Server:
tools\kafka_2.10-0.8.2.1\bin\windows\kafka-server-stop.bat8) Stop Zookeeper:
tools\kafka_2.10-0.8.2.1\bin\windows\zookeeper-server-stop.batHappy Kafka'ing..
Comments