Hi all,
I am new to Microservice Patterns such as EventSourcing and Saga, we are implementing these patterns using Axon Framework. Now from what I understand about Saga from Chris’s blog if we use choreography-based saga on 2 MS such as
-
Order Service and
-
Customer Service
Here Order Service receives an compensating event called CreditLimitExceeded from Customer service if the order can not be fulfilled because of Credit Limit in Customer Service, now if I’ve to implement it using Axon Framework I can use Saga where I’ll start a Saga from creation of an order and based on CreditLimitExceeded and I’ll end saga and take any compensating action such as rollback order or inform user about his/her credit limit. This EndSaga can be handled conditionally or by @EndSaga annotation over an SagaEventHandler.
What I need to know is this can also be achieved by normal @EventHandler annotations in Axon then why to use Saga annotations what is the use of Saga store and how is it used? From a previous conversation with Allard on this stackoveflow thread I understood that Saga table is cleared if saga is ended. How is this saga_entry table utilized and what is different in implementing this Saga using simple EventHandlers?
Another thing I would like to know is that does the Saga that we create using @StartSaga and @Saga annotation does it represent Saga Orchestrator and thus it is not an Choreographed Saga instead it is an Orchestrated Saga?
Apologies for the ignorance that I’ve regarding Axon and patterns but insights would be really helpful and welcome.
Thanks and Regards,
Malay M