scheung38 / python-kafka-avro

A simple examle for Python Kafka Avro

Home Page:https://sonnguyen.ws/simple-example-python-kafka-avro/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple example to create a producer (producer.py) and a consumer (consumer.py) to stream Avro via Kafka

Install packets via PIP

pip install -r requirements.txt

Run consumer:

python  consumer.py

Run producer:

python producer.py

Please make sure that you had Kafka in your machine. And please correct the connection information before running.

In the source code repository above, I also created consumer_bottledwater-pg.py to decode avro data that pushed from bottedwater-pg Kafka producer.

About

A simple examle for Python Kafka Avro

https://sonnguyen.ws/simple-example-python-kafka-avro/

License:MIT License


Languages

Language:Python 100.0%