I’ve a problem with routing of commands when having Axonserver CE (Axon Version 4.3.1) and multiple services which contains the same command. So first my Szenario:
All of my services using a lib (https://github.com/holunda-io/camunda-bpm-taskpool) which are providing some basic commands, like e.g. “io.holunda.camunda.taskpool.api.task.CreateTaskCommand”. And of course also related Aggregates. Those Commands/Aggregates do not have some special RoutingKey.
My services are doing different stuff, so if a service fires the given command, it should also process this command. Problem is that axon server routes those commands (randomly) to all service which are using the (taskpool) lib.
So I already looked around here and found one possible solution … providing a custom RoutingStrategy. So my new custom strategy just appends the spring app name to the one from AbstractRoutingStrategy. And I’ve also verified that this really happens. But Axon Server does still route them to random services.
Is there something missing additional to the strategy? I think also the command handler needs some special key for this, or not? But I found no Information how I can do this.