Skip to content

Instantly share code, notes, and snippets.

@ghafran
Last active August 29, 2015 13:57
Show Gist options
  • Save ghafran/9585408 to your computer and use it in GitHub Desktop.
Save ghafran/9585408 to your computer and use it in GitHub Desktop.
Experiment with Kafka
wget http://apache.petsads.us/kafka/0.8.1/kafka_2.9.2-0.8.1.tgz
tar -xzf kafka_2.9.2-0.8.1.tgz
cd kafka_2.9.2-0.8.1
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 test
bin/kafka-topics.sh --list --zookeeper localhost:2181
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning
bin/kafka-console-consumer.sh --zookeeper kafka1:2181 --topic log --group 1
bin/kafka-console-consumer.sh --zookeeper kafka1:2181 --topic log --group 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment