Consider the following use case:
My system must upload files. The uploading is started by an event on the eventbus (i.e. NewFileEvent), and should be performed assynchronously.
So i have a Saga has a #SagaEventHandler and @StartSaga on handle(NewFileEvent event).
Suppose my SagaManager is configured with a thread pool with 2 workers, and a JdbcSagaRepository.
While those two workers are busy (so there are 2 active Sagas), a third “NewFileEvent” is fired.
At this point, the application is stopped (before the 2 original workers were fininished uploading). Will the third saga be persisted by axon? Under which condition?