You can use -Ddebug as JVM parameter (or —debug as app param) to have Spring output a report that will tell you which beans have been created and why (not).
Look for the DistributedCommandBus or the SpringCloud(HttpBackup)CommandRouter.
Also, do you wire a CommandBus or a SimpleCommandBus in your application?
All questions are valid, so it’s definitely not a waste of our time; so please keep posting questions!
For your issue at hand, let me first answer the fallback mechanism.
The fallback mechanism for the SpringCloudCommandRouter was mainly introduced as there are Spring Cloud implementation which do not support the adjustment of their own Metadata (for example, Consul).
However, as I see you’re using Eureka, that method of sharing the message routing information between the nodes should work fine.
Thus, you’re not inclined to use the fallback mechanism in your situation.
The reason that you’re receiving a 404 is however still interesting, as it should only try to pull message routing information of nodes which are in your cluster.
Could you check which nodes are alive in your Eureka Cluster and see which node’s message routing information request fails due to the 404?
And for your second question, which you’ve seemed to have fixed: if ‘no node is known to accept command [x]’, that means that the application publishing the (in your scenario) CreateTopicCommand can’t find any other nodes which are able to handle that command.
This might occur because of the 404 you’re receiving, as that call is done so that a node in the cluster knowns what all the other nodes in the cluster can handle message-wise.
Thus if it fails to update it’s knowledge of what every node can do, it could just as well think that no node is able to handle your CreateTopicCommand.
the 404 is caused by Axon’s attempt to retrieve capabilities from that service. Since it’s not an Axon service, it won’t get that information. The SpringCloudCommandRouter should blacklist that instance (not asking it again), but it seems not to do that for some reason.
Why the commands don’t get routed, is a mystery, so far. Can you see any “command filters” configured on any of the service instances’ meta data?
The blacklisting on an exception\ was added in in Axon version 3.1.1.
Axon Framework 3.1 only introduces the fallback mechanism, not the blacklisting on exceptions occurring (my bad).
Additionally, if you’ve got services you know before hand will never handle any Axon traffic, your can add a Predicate serviceInstanceFilter to the configuration of your SpringCloudCommandRouter/SpringCloudHttpBackupCommandRouter.
That predicate can then be set up to ignore service instances with specific names/etc, which in your case could be a filter on the application name ‘CONFIGURATION-SERVICE’.
I tested the situation and did regard this as a bug.
The ServiceInstance implementations do not necessarily have an equals() function, something which is an issue with the contains() function which was being called.
I opened up a bug ticket and resolved it.
The fix should be a part of 3.1.2.
Thanks for notifying us of it, feel free to try it out and see if it solves the issue you had!