Bringing up Kafka - ravikumarchenna/kafka-cassandra-tutorial GitHub Wiki
Java Installation
sudo add-apt-repository ppa:webupd8team/java
sudo apt update;
sudo apt install oracle-java8-installer
tar -xvf <>
~/packages/kafka_2.11-0.11.0.3$ bin/zookeeper-server-start.sh config/zookeeper.properties
~/packages/kafka_2.11-0.11.0.3$ bin/kafka-server-start.sh config/server.properties
~/packages/kafka_2.11-0.11.0.3$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic my-topic
Check topics
bin/kafka-topics.sh --list --zookeeper localhost:2181
Send message
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic my-topic
Consume message
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic my-topic --from-beginning
Install Confluent Kafka
wget -qO - https://packages.confluent.io/deb/5.3/archive.key | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.3 stable main"
sudo apt-get update && sudo apt-get install confluent-community-2.12
sudo systemctl start confluent-zookeeper
sudo systemctl start confluent-kafka
sudo systemctl start confluent-schema-registry