0
votes

New day, new Axon question. Today I want to ask about the Axon Saga process. What is the best practise to use Axon Saga between microservices?

  1. Async Saga: The "Master" service send commands to every "Slave" at the same time. And if there is some problem it will be handled by some compensation.
  2. Sync Saga: The "Master" service send commands to the slaves one after another in a specific order. And every time waits for the response, then continues the Saga.
1

1 Answers

1
votes

When working with messages like a Saga does, I would always embrace the fact you are living in an asynchronous world. However, you could just as well found the perfect use case which points you to requiring your set up to be synchronous.

To be honest, the Master/Follower (the term "Slave" is not overly kind to use I think) process example does not make it to clear what you are trying to achieve. But regardless, your set-up will be faster to respond and more lenient if you expect things to be asynchronous, so I would lean towards this.

It however always depends on the exact use case of the issue. So I would not make this a "best practice" response, since as said it depends on a per use case basis.