Learn to build distributed Event-driven Microservices, CQRS, Event Sourcing, SAGA, Transactions
- Products : This microservice is responsible for managing products. A user can create, update, get details, list and delete products.
- Orders : This microservice is responsible for managing orders. A user can order many products.
- Payment : This microservice is responsible for managing payments. Save details about the payment associated with the order.
- Users : This microservice is responsible for managing users. Save details about the user.
- Event-Driven Microservices
- Basics of Spring Cloud
- Axon Framework
- Eureka Discovery Service
- CQRS Design Pattern
- Spring Cloud API Gateway
- SAGA Design Pattern
- Event Based Messages
- Transactions
Service | EndPoint | Method | Description |
---|---|---|---|
Orders | /orders | POST | Create an order |
Products | /products | GET | Return list of products |
Products | /products/{id} | GET | Return details from a specific product |
Products | /products | POST | Insert a new product |
Products | /products/{id} | PUT | Update a specific product |
Products | /products/{id} | DELETE | Delete a specific product |
Users | /users/{userId}/payment-details | GET | Return details from a userfor payment based on your ID |
Service | EndPoint |
---|---|
Products | /products/{id} |
Products | /products |
Orders | /orders |
Users | /users/{userId}/payment-details |
URI for gateway : http://localhost:8082
###Swagger
- Products : http://localhost:8082/products/swagger-ui.html
- Orders : http://localhost:8082/orders/swagger-ui.html
- Users : http://localhost:8082/users/swagger-ui.html
###Postman collection
- Netflix Eureka is used for discovery service.
- Netflix Zuul is used for gateway.
- Sleuth and Zipkin
You can open Zipkin : http://localhost:9411
- ElasticSearch is on 6972 port
- Logstash TCP is on 5000 port
- Kibana is on 5601 port
Open kibana with http://localhost:5601/. You must define an index pattern (taner-*) on Management/Stack Management.
You can open Grafana : http://localhost:3000/
username/password: admin
- >mvn clean package : to build
- >docker-compose up --build : build docker images and containers and run containers
- >docker-compose stop : stop the dockerized services
- Each maven module has a Dockerfile.
In docker-compose.yml file:
- Books Service : 7500 port is mapped to 7500 port of host
- Orders Service : 7501 port is mapped to 7501 port of host
- Params Service : 7502 port is mapped to 7502 port of host
- Eureka Discovery Service : 8761 port is mapped to 8761 port of host
- Spring Boot (/ Zuul) Gateway Service : 8762 port is mapped to 8762 port of host
- Sleuth and Zipkin Integration
- ElasticSearch, Kibana, Logstash integration
- Spring Boot Gateway
- Spring-Boot 2.5.7.RELEASE
- Java 16