Spring Boot RabbitMQ Mongo Sample saga Part   3
Channel: Tech DIY
Date: 2021-03-21

https://bit.ly/3dfspyQ 
In this short three-part series, we are trying to do a sample POC on the Saga choreography pattern. This use case is depicted on the site @ (link as in Links sections below). Here we have two services Order Service and Customer service. When the customer places an order, the Order service captures the details with customerId. Now this order will be placed in the Order_Queue with status as PENDING. Further Customer service listens to the Order from Order_Queue and loads the customer details and checks whether the user has enough money in his /her wallet. Then Customer service will reply to the decision via placing the order object on Customer_Queue. Later on, the Order service will receive this response and updates the order details in the Order database. 
  
links
https://microservices.io/patterns/data/saga.html@s/data/database-per-service.html
https://www.rabbitmq.com

Before starting with this please ensure the following
1) Intellij IDEA is installed, or any IDE of your choice. 
2) Postman is installed, or any REST client of your choice.
3) RabbitMQ installed.
4) MongoDB and MongoDB Compass

Note: this is a basic example code. In actual scenarios, the saga pattern would be implemented using the various frameworks available. 

#learningisfun #learningthroughplay #learningathome #instagood #trending #codinglife #codingisfun #codingbootcamp  #codingmemes #programminglife #programmingmemes #programmingisfun #programmingjokes #javasparrow  #javafoodie  #javanese #teaching #onlinelearning #edtech #opensource #technology #software #programming #coding #springtime #springiscoming