Hey,
We are trying to set up axonserver with multiple contexts. 1 of these contexts is an “integration” context where all applications will publish milestone-events that other applications can subscribe to.
Everything seems to work fine except for the registration of commandhandlers/eventhandlers/queryhandlers. In the overview page these are all registered to the context of the primary AxonServerConfiguration. The other context has no registered handlers.
Eventhandlers seem to work as expected (receiving events from the correct context), but when i send a command from an application that uses a different context I get a “NoHandlerForCommandException: No Handler for command: GenereerDocumentIntegrationCommand”.
so basically I have the following problem:
-
Application A is trying to send a command U
-
Application B is connected to context X & Y
-
Application B has a commandhandler for command U registered to context Y (visible in overview screen on axonserver)
Application A is connected to context X and sends a command U => NoHandlerForCommandException
Aplication A is connected to context Y and sends a command U => command is processed by Application B
Is there a specific bean I need to use so that the commands/events/queries are registered to the correct context?
Kind Regards,
Ben Allaerts