I assume you’ve taking a look at it, but I am gonna reiterate it any how.
Have you tried setting things up with Axon Server too?
It will greatly simplify any configuration stuff you’d have to do to attach event streams (through Kafka) and command handling (through the Spring Cloud extension), thus getting you back in to providing business functionality instead.
Regardless, to the issue at hand, using the Spring Cloud solution to distributing command you should be aware that an Axon Client node’s awareness of the cluster is only updated on the heartbeat event of your application.
At the heartbeat event the
SpringCloudCommandRouter will check with the Discovery Service provided by Spring Cloud to deduce which nodes can handle what commands.
This means there is by definition a short time window where nodes cannot find one another when using Spring Cloud.
Other than that, I’d likely verify whether your Eureka Server actually shows the connected Eureka Clients.
The latter being your Axon applications in this scenario.
If the server doesn’t show them to be connected, well, then you’ve got the culprit there.
When it comes to correctly configuring Eureka, granted if that’s the issue, I would suggest you to check FAQ’s from their side.
Concluding, as said earlier, Axon Server would greatly simplify your situation here.
Regardless, I hope my above info helps you out to resolve the issue at hand!
Steven van Beelen
Axon Framework Lead Developer
Axon in Action Award 2019 - Nominate your project