This project demonstrates a microservices architecture using Go and RabbitMQ for inter-service communication.
- Order Service: Handles order creation and management
- Payment Service: Processes payments for orders
- Go 1.21 or higher
- Docker (for RabbitMQ)
- Git
-
Clone the repository: ```bash git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git ```
-
Start RabbitMQ: ```bash docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:management ```
-
Install dependencies: ```bash go mod tidy ```
-
Start Order Service: ```bash cd order-service go run main.go ```
-
Start Payment Service: ```bash cd payment-service go run main.go ```
``` ├── order-service/ │ ├── main.go │ ├── config/ │ │ └── config.go │ ├── models/ │ │ └── order.go │ └── handlers/ │ └── order_handler.go ├── payment-service/ │ ├── main.go │ ├── config/ │ │ └── config.go │ └── handlers/ │ └── payment_handler.go ├── common/ │ ├── rabbitmq/ │ │ └── rabbitmq.go │ └── models/ │ └── message.go └── go.mod ```
MIT License