Hi all,
I have a problem with my application [1]. I would like to make the distributed command asynchronous. I set up the local segments of the command bus like this: (other parts of the distributed command bus according to the documentation)
@Bean(destroyMethod = "shutdown")
@Qualifier("localSegment")
public CommandBus localSegment(TransactionManager transactionManager) {
AsynchronousCommandBus asynchronousCommandBus = new AsynchronousCommandBus();
asynchronousCommandBus.registerDispatchInterceptor(new BeanValidationInterceptor<>());
asynchronousCommandBus.registerHandlerInterceptor(new TransactionManagingInterceptor<>(transactionManager));
return asynchronousCommandBus;
}
The invocation inside of the local segment is asynchronous. The invocation of remote service is not. I am using Spring cloud with AMQP for events. I wonder if I am missing something.
I can see that SpringHttpCommandBusConnector uses the REST operations - is there a way to make the REST call async?
[1] https://github.com/xstefank/axon-service
Martin