What if Saga is not ended ? Will it cause memory leak ?


I’m new to axon, it’s a amazing CQRS framework .

now I’m learning the show case project Axon-trader and found handle(SellTransactionPartiallyExecutedEvent event) of SellTradeManangerSaga is annotated with @EndSaga. So the Saga won’t end if the sell transaction partially executed , can it be correct status of a Saga ? maybe I misunderstand something.


Sagas that are open are stored in the SagaStore.
Having lots of open but inactive sagas that will never be closed is potentially problematic in a number of ways - including unbounded growth of the size of your SagaStore.
Some code path “should” explicitly end a saga eventually.

Deadlines are one way to deal with open sagas waiting for an event that may never arrive:

Thank you Steven. Deadlines are the suitable way I’m looking for .

在 2020年1月6日星期一 UTC+8上午10:34:41,Steven Marcus写道: