Implementation of microservices in fastapi with mongodb, CDC and KAFKA
python3 -m venv myenv or virtualenv myenv
source myenv/bin/activate && pip install -r requirements.txt
Setup db connection username, password and db host in db.py
kafka-topic --bootstrap-server localhost:9092 --create --topic dashboardtopic
Now run the project.
- python products/api.py
- python orders/api.py
- python kafka_mongo/kafka_consumer.py
- python kafka_mongo/order_change_stream.py
- python kafka_mongo/product_change_stream.py
All set, now hit the API on URL 3000 and 3001 by http://localhost:3000 or http://localhost:3001.