Hello,
Our requirement is to deploy code on Google Cloud platform (using Kubernetes)
We are trying to move from Simple Command bus to Axon Distributed Command bus to run our code in clustered environment.
We have made changes as per the reference document provided :https://github.com/AxonIQ/reference-guide/blob/master/extensions/spring-cloud.md
In Spring Boot Application class we have annotated with EnableDiscoveryClient.
@EnableDiscoveryClient
Maven dependency added :
<!-- https://mvnrepository.com/artifact/org.axonframework.extensions.springcloud/axon-distributed-commandbus-springcloud -->
<dependency>
<groupId>org.axonframework.extensions.springcloud</groupId>
<artifactId>axon-distributed-commandbus-springcloud</artifactId>
<version>4.0-RC1</version>
<exclusions>
<exclusion>
<groupId>org.axonframework</groupId>
<artifactId>axon-core</artifactId>
</exclusion>
</exclusions>
</dependency>
Error getting :
Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘commandGateway’ defined in class path resource [org/axonframework/springboot/autoconfig/AxonAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘commandGateway’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘springCloudDistributedCommandBus’ defined in class path resource [se/ikea/iops/config/SpringCloudAxonConfig.class]: Unsatisfied dependency expressed through method ‘springCloudDistributedCommandBus’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘springCloudCommandRouter’ defined in class path resource [se/ikea/iops/config/SpringCloudAxonConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.axonframework.commandhandling.distributed.CommandRouter]: Factory method ‘springCloudCommandRouter’ threw exception; nested exception is org.axonframework.common.AxonConfigurationException: The Registration is a hard requirement and should be provided"
Can any one help us to resolve this issue?
Some sample code with Axon Distributed command bus + Spring Boot with Spring cloud + Kubernetes would be much appreciated
Thanks
Aniwesh