I have a basic query on saga repository, when the saga will actually persist in repository and available for other processing like event,command handlers.
I assume saga will persist after the @StartSaga event handler method is processed irrespective of any command fired with in method or will it wait till the command handler method is completed. Please correct me.
I have latency issue, where the saga repository is not available for other processing.
My requirements is i have 3 jms message listeners and these messages will come one after the other with gap of 10 milli seconds.
Second and Third messages are depend on First, which will check whether saga is created and active before processing the actual message.
Responsibility of First message is to create Aggregate and create Saga instance, in @StartSaga event method there is no much processing logic it just fires another command to process another saga event.
My issue is before First message create the saga Second and Third message are received and they are not able to find the saga in the repository and message are getting failed.
What is the best way to cater this issue to make saga is available for other messages which are coming with short gap of time.
I am using InMemorySagaRepository and also tried oracle jpa saga repository, also tried async saga and using simple command bus.