A repository to test and experiment kafka on the go
python3 -m venv svenv
source venv/bin/activate
install dependencies: pip install -r requirements.txt
python kafka-producer.py topic1 topic2
python kafka-producer.py <topic name> <topic name> <topic name>...
python kafka-consumer.py <topic name> <consumer group id>
make kafka
make clean
To enter docker shell
docker exec -it kafka /bin/sh
To Add/Alter Topic/Partition:
kafka-topics.sh --alter --zookeeper zookeeper:2181 --partitions 2 --topic <topic name>
To delete topic:
kafka-topics.sh --bootstrap-server kafka:9092 --delete --topic <topic name>
List of topic
kafka-topics.sh --list --zookeeper zookeeper:2181
List of messages:
kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic <topic name> --from-beginning