Playground repository to mess around with Kafka things.
- Install Vagrant
- Clone this repo
git clone https://github.com/tarabaskara/kafka-playground.git
- Go inside this repo folder
- Run
vagrant up --provision
- SSH into the machine by running
vagrant ssh
- Go to Kafka dir
cd /usr/local/kafka
- Start Zookeeper server
sudo bin/zookeeper-server-start.sh config/zookeeper.properties
- Start Kafka server
sudo bin/kafka-server-start.sh config/server.properties
sudo bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic newTopic
sudo bin/kafka-console-producer.sh --broker-list localhost:9092 --topic newTopic
sudo bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic newTopic --from-beginning