You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that if a service wants to use DistributedCommandBus with SpringCloudCommandRouter it's not really possible to do so. SpringCloudCommandRouter will throw a new IllegalStateException("There should be no scenario where the local member does not exist."
when there haven't been any local member (which would happen when subscribing for a local @CommandHandler?).
It is a perfectly valid scenario that a service would like to dispatch a method to another one, whilst it itself doesn't have any command handlers.
There's no obvious workaround currently, as things are declared as private, so can't really override stuff without copy-pasting the whole class.
Thanks for your help!
The text was updated successfully, but these errors were encountered:
you did hit a little issue there, it seems. The problem is that a local instance is only configured once the loadFactor and/or CommandMessageFilter for the local node is registered. The default command message filter is a DenyAll, which basically means it doesn't accept any commands. Since that's the default, no changes are made.
While we'll fix this, as a workaround, you could configure an explicit loadFactor on the DistributedCommandBus to trigger this registration. The loadFactor may be 0.
Instead of throwing an exception when no locally registered node is
found, it should just ignore this and copy members from the Service
Registry. If a "pre-registration" local member is found, it should
be removed, as it will be replaced by a copy from the Service Registry
Resolves issue #1
Hey there!
I noticed that if a service wants to use DistributedCommandBus with SpringCloudCommandRouter it's not really possible to do so. SpringCloudCommandRouter will throw a
new IllegalStateException("There should be no scenario where the local member does not exist."
when there haven't been any local member (which would happen when subscribing for a local @CommandHandler?).
It is a perfectly valid scenario that a service would like to dispatch a method to another one, whilst it itself doesn't have any command handlers.
There's no obvious workaround currently, as things are declared as private, so can't really override stuff without copy-pasting the whole class.
Thanks for your help!
The text was updated successfully, but these errors were encountered: