Skip to content

RedbeanGit/polyshop-catalog

Repository files navigation

Catalog

Description

The Catalog microservice is responsible for maintaining a list of products, each with a name, description, and price. It was developed as part of a course project on creating microservices using RabbitMQ for communication between services.

Technologies Used

  • Programming Language: Java with Spring Boot
  • Database: MongoDB
  • Message Queue: RabbitMQ
  • Containerization: Docker

Installation and Configuration

  1. Clone the GitHub repository:
git clone git@github.com:RedbeanGit/polyshop-catalog.git
  1. 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/.

  2. Navigate to the Catalog microservice directory:

cd polyshop-catalog
  1. Launch Docker Compose to start the necessary containers:
docker-compose up -d

Now you can choose to run the Catalog service inside a docker container or directly on your host.

Running with docker

  1. Build the Docker image for the microservice using the provided Dockerfile:
docker build -t polyshop-catalog .
  1. Run the container from the image you have just builded:
docker run --name polyshop_catalog polyshop-catalog

Running on host

  1. Start Spring Boot application:
./mvnw spring-boot:run

API

List of routes/API endpoints available for this microservice:

  • GET /products : Retrieves the list of all products in the catalog.
  • GET /products/{productId} : Retrieves a product with the specified ID.
  • POST /products : Creates a new product.

Message Queue

The Catalog microservice listens for all messages coming from the Order microservice (order-exchange) using the routing key order.checked in order to update its own list of products.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published