You will learn how to create Kafka producer and Consumer in python.
- Install
kafka-python
we will useKafkaProducer
andKafkaConsumer
pip3 install kafka-python
- Run
01-start-zookeeper.sh
start zookeeper server - Run
02-start-kafka.sh
start kafka server - Run producer.py
- Run consumer.py
This is it. We have created our first Kafka consumer in python. We can see this consumer has read messages from the topic and printed it on a console.
git add . && git commit -m 'new app' && git push