This will show you how to send data by producer and capture by consumer using python
In first step we will need to upload data to 'CSV.py' file. It will read data from CSV and it will be used for Producer. Shown as
Before heading to Producer, you will need to create a topic using below command (in Windows) kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test Now we will use Prodecer for sending data from CSV into Consumer in real time. For this you will need to make sure your Zookeeper and Kafka running at the same time. As Shown in the figure:
After starting these two, Now you will need to run Producer.py and it will send data to Concumer.
It's all set for consumer to catch the data from producer , you just need to run consumer code...