This project implements a microservices architecture using RabbitMQ for communication between services. Each service is responsible for a specific functionality and communicates through message queues.
- Functionality: Handles stock management operations, including updating and deleting items in the inventory.
- Database: MySQL
- RabbitMQ Queue:
stock_management - Port: 5003
- Functionality: Responsible for creating new items in the inventory.
- Database: MySQL
- RabbitMQ Queue:
item_creation - Port: 5002
- Functionality: Monitors the health of the application.
- RabbitMQ Queue:
health_check - Port: 5001
- Functionality: Produces messages to various RabbitMQ queues based on HTTP requests.
- Endpoints:
GET /health: Sends a health check message.POST /item: Creates a new item.PUT /inventory/<item_id>/stock: Updates stock for an item.DELETE /inventory/<item_id>: Deletes an item.POST /order: Creates a new order.
- Port: 5000
- Clone the repository.
- Set up the MySQL database and configure the environment variables.
- Start RabbitMQ.
- Run the services.
You can run each service using the following bash commands:
For the Stock Management Service
python sm_cthree/stock_management.py For the Item Creation Service
python ic_ctwo/item_creation.py For the Health Check Service
python hc_cone/healthcheck.py For the Producer Service
python producer/producer.py - Use a tool like Postman or curl to interact with the services via their respective endpoints.
For questions or support, please contact:
- Y Manish Kumar: ymanishk602@gmail.com
Feel free to submit issues and pull requests. Contributions are welcome!
This project is licensed under the MIT License.