Hello,
I was encountering an issue, where I was implementing a saga.
- the Saga is triggred by one event an emits a command. It associates with a new porperty, and drops the original association.
- the command results in an event, which is supposed to trigger the second @SagaEventHandler
When using an AsynchronousCommandBus the second event handler is not triggered. After a lot of debugging, I did go down to the configuration to simplify the environment and replaced the command bus with a SimpleCommandBus suddenly the Saga started to work.
`
@Bean
public CommandBus commandBus() {
// AsynchronousCommandBus commandBus = new AsynchronousCommandBus();
SimpleCommandBus commandBus = new SimpleCommandBus();
commandBus.setDispatchInterceptors(Arrays.asList(new BeanValidationInterceptor<>()));
return commandBus;
}
`
Do I have to make additional configurations on the AsynchronousCommandBus?
I actually like to work with the Asynchronous Command Bus, even during development, as it forces you to not make any assumptions about the sequence of execution of things.
Does anyone have insights on this issue ?
Thanks a lot.
Best regards,
Dominic