Questions on command bus implementation using spring cloud

Hi there,

I am trying to use distributed command bus using spring cloud eureka and axon 4.4
I have a Saga coordinator who issues a command to the clients taking part in the saga
All the clients and the saga coordinator are registered on Eureka however I am getting NoHandlerForCommandException while sending a command
Could somebody assist here with the configuration required to get it working, please?

Another question I have is quite a general one
Can distributed command bus works if Kubernates service discovery is used instead of Eureka service discovery?

Thanks,
Chetan

Hi Chetan,
I have an Axon based Spring Boot Application that uses Command Bus based on Spring Cloud.
To make it work I followed these steps.

I added these dependencies to maven:

    <dependency>
        <groupId>org.axonframework.extensions.springcloud</groupId>
        <artifactId>axon-springcloud-spring-boot-starter</artifactId>
        <version>4.4</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>

then I added the following properties:

eureka.client.enabled=true
eureka.client.registry-fetch-interval-seconds=5
eureka.client.service-url.defaultZone=http://localhost:8761/eureka

axon.distributed.enabled=true
axon.distributed.load-factor=100
axon.distributed.spring-cloud.mode=rest
axon.distributed.spring-cloud.rest-mode-url="/member-capabilities"

And obviously I have a running instance of Eureka on port 8761.

Regards
Damiano