Skip to content

This will show you how to send data by producer and capture by consumer using python

Notifications You must be signed in to change notification settings

majid0110/Kafka-Producer-and-consumers-using-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Kafka Producer and consumers using python

This will show you how to send data by producer and capture by consumer using python

CSV.py

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 image

Producer.py

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:

Zookeeper Server:

image

Kafka Server:

image

After starting these two, Now you will need to run Producer.py and it will send data to Concumer.

Consumer

It's all set for consumer to catch the data from producer , you just need to run consumer code...

About

This will show you how to send data by producer and capture by consumer using python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages