Distributed Command Bus - Spring Cloud Connector

Hi,

I was wondering if there is any information (documentation, video, discusion, anything…) concerning the Spring Cloud Connector for the distributed command bus?

I only found a TODO on the bottom of this page :slight_smile:

https://docs.axonframework.org/part3/command-dispatching.html

Cheers
Nick

Hi Nick,

at the moment I only have access to the source code and test cases ;-). The developer who built this is currently on a consultancy assignment out of the country. He is back next week. I’ll ask him to complete the documentation (or at least send some samples).

Cheers,

Allard

Hi,

do you have any update on this issue?

Thanks,

Yes, I do have a brief update. My colleague will be writing that chapter soon.
Configuring the connector is fairly simple. You need to have a dependency on the Spring Cloud Discovery Client. Then, just define a bean of SpringCloudCommandRouter where the DiscoveryClient is autowired. A good (default) routing strategy (constructor arg 2) is the AnnotationRoutingStrategy.
For the SpringHttpCommandBusConnector, it’s the same story, create a bean, autowire the localCommandBus (make sure to use @Qualifier(“localSegment”)), RestTemplate and Serializer. They should all be present in the application context.

Once the CommandRouter and Connector are defined in the application context, Axon will automatically configure the DistributedCommandBus (if you’re on Spring Boot).

Hope this gives a bit of a start. Will push my colleague to finish the documentation.

Cheers,

Allard

Hi,
Can you share the codebase so that I can follow along and implement the same.
Thanks,
Saibal

There’s a code sample in the documentation:
https://docs.axonframework.org/v/3.0/part3/command-dispatching.html#spring-cloud-connector

Cheers,

Allard