The Shipping microservice is a fictitious shipping service that does nothing but receive messages from the Order microservice and randomly sends an event indicating the success or failure of a shipment. It was developed as part of a course project on creating microservices using RabbitMQ for communication between services.
- Programming Language: Java with Spring Boot
- Message Queue: RabbitMQ
- Containerization: Docker
- Clone the GitHub repository:
git clone git@github.com:RedbeanGit/polyshop-shipping.git-
Install Docker and Docker Compose on your machine if you haven't already. You can follow the installation instructions on Docker's official website: https://docs.docker.com/get-docker/ and https://docs.docker.com/compose/install/.
-
Navigate to the Shipping microservice directory:
cd polyshop-shipping- Launch Docker Compose to start the necessary containers:
docker-compose up -dNow you can choose to run the Shipping service inside a docker container or directly on your host.
- Build the Docker image for the microservice using the provided Dockerfile:
docker build -t polyshop-shipping .- Run the container from the image you have just builded:
docker run --name polyshop_shipping polyshop-shipping- Start Spring Boot application:
./mvnw spring-boot:runThe Shipping microservice listens for messages from the Order microservice and sends events upon successful or unsuccessful shipments.