This is the code for my "Streamline Event-Driven Microservices With Kafka and Python" for Toptal blog.
- Set up Confluent Cloud.
- Copy the contents of the
.env.example
file to an.env
file and fill in the variables from Confluent Cloud. - Install Python3 and the required dependencies:
pip3 install -r requirements.txt
. - Run
python3 simple_producer.py
orpython3 advanced_producer.py
to test the producer.