Saga in axon framework

I want to use axon framework for managing transactions across multiple bounded context. In my use case I can have multiple saga instances which are not completed because of some exception while processing and hence all such sagas would not be ended. Is there any limit on the number of saga instances that can remain active after a certain interval of time.
Is their any guidance around a saga should always end eventually.

Hi Ashwini,

Most likely, the sagas are stored in a database. Empty databases always perform better than full ones. So if you can clean up “expired” Sagas, that’s always the better option.

I once heard a useful piece of advice when it comes to Sagas, or processes in general, they always have a deadline. There is always a certain time in which you expect such a process to have ended. And when they haven’t you want to flag that process to investigate why.

In practice, this will probably mean that you should schedule a deadline in each Saga and either end the saga when the deadline occurs, or trigger a monitoring process to trigger it as “stuck”. You can do this for the entire lifecycle of the Saga, but also for individual steps.

Hi Aswini,

You can find more info in this blog.

Thank you @allardbz for clarifying