Skip to content

Instantly share code, notes, and snippets.

@adrianulbona
Last active May 30, 2017 08:04
Show Gist options
  • Save adrianulbona/785a2085f62a263594b1faf8153bb2df to your computer and use it in GitHub Desktop.
Save adrianulbona/785a2085f62a263594b1faf8153bb2df to your computer and use it in GitHub Desktop.
Kafka - Getting Started
Kafka - Getting Started
https://kafka.apache.org/quickstart
1. get
wget http://mirrors.m247.ro/apache/kafka/0.10.2.0/kafka_2.11-0.10.2.0.tgz
tar -xzf kafka_2.11-0.10.2.0.tgz
2. start
cd kafka_2.11-0.10.2.0
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
3. test
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 --bootstrap-server localhost:9092 --topic test --from-beginning
4. kafka-python (https://github.com/dpkp/kafka-python)
pip install kafka-python
5. kafka-docker (https://github.com/wurstmeister/kafka-docker)
6. kafka-unit (https://github.com/chbatey/kafka-unit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment