i have multiple services running on different hosts and connected to a single instance of axon-server. i am able to shares events among all services. i.e., one service can fire an event and rest others are able to listen it.
i want the same for queries as well. i.e., many services will fire a query and one service will handle it. i tried doing this as follows:
- when i used queryGateway.query( query, responseType): i got queryhandler not found exception.
- when i used queryGateway.subscriptionQuery( query, initialResponseType, updateResponseType): i got empty result and the queryhandler not invoked.
- when i used queryGateway.scatterGather( findCourierByIdQuery, responseType, timeout, timeUnit): i got an empty stream and the queryhandler not invoked.
When i fired the query from same service in which the query-handler is written then only the handler is getting invoked.
Now my question is whether query sharing among multiple services is allowed in axon like we do for events. if yes how to achieve it.