Last active
October 9, 2015 21:53
-
-
Save fornarat/129bfbdd70cea19e77df to your computer and use it in GitHub Desktop.
Kafka up & running in 5'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://kafka.apache.org/documentation.html#quickstart | |
Prerequisites: | |
# adding java | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer | |
Install: | |
cd /opt/ | |
wget http://apache.rediris.es/kafka/0.8.2.1/kafka_2.11-0.8.2.1.tgz | |
tar -xzf kafka_2.11-0.8.2.1.tgz | |
cd kafka_2.11-0.8.2.1/ | |
Start: | |
bin/zookeeper-server-start.sh config/zookeeper.properties | |
bin/kafka-server-start.sh config/server.properties | |
Examples: | |
cd /opt/kafka_2.11-0.8.2.1/ | |
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-producer.sh --broker-list localhost:9092 --topic test | |
bin/kafka-console-producer.sh | |
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test | |
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment