(https://app.circleci.com/pipelines/github/mhnvelu/dairy-factory)
Below microservices have been implemented.
- dairy-factory
- dairy-factory-order-service
- dairy-factory-inventory-service
- dairy-factory-inventory-failover-service
- dairy-factory-gateway
- dairy-factory-eureka-server
- dairy-factory-config
- dairy-factory-config-server
Please refer my Notes to know about Sagas, Spring Cloud projects
A repository on Spring State Machine is available at spring-state-machine-project
- Saga Execution Coordinator is implemented using Spring State Machine.
- Events:
- VALIDATE_ORDER, VALIDATION_PASSED, VALIDATION_FAILED, ALLOCATION_SUCCESS, ALLOCATION_NO_INVENTORY, ALLOCATION_FAILED, BUTTER_ORDER_PICKED_UP, CANCEL_ORDER
- States:
- NEW, VALIDATED, VALIDATION_EXCEPTION, ALLOCATED, ALLOCATION_ERROR, PENDING_INVENTORY, PICKED_UP, DELIVERED, DELIVERY_EXCEPTION, CANCELLED
- Run the mysql container MySQL Docker
- docker run -d mysql
- Connect to the mysql server and manually execute the script mysql-init.sql. This script creates the DB, DB User and Password.
- Run the JMS container
- docker run -p 8161:8161 -p 8162:61616 vromero/activemq-artemis
- Run dairy-factory-eureka-server. It binds to port 8761
- Run dairy-factory-config-server. It binds to port 8888
- Run dairy-factory with profiles
local-service-discovery,local
. It binds to port 8080 - Run dairy-factory-order-service with profiles
local-service-discovery,local
. It binds to port 8081 - Run dairy-factory-inventory-service with profiles
local-service-discovery,local
. It binds to port 8082 - Run dairy-factory-inventory-failover-service with profiles
local-service-discovery
. It binds to port 8083 - Run dairy-factory-gateway with profiles
local-service-discovery
. It binds to port 9090 - Run Zipkin container
- docker run -d -p 9411:9411 openzipkin/zipkin
- The UI is available at http://localhost:9411/zipkin/