Reputation: 43
We are running Axon and have multiple services connected to it. All is working fine with this exception that running everything locally while developing/testing the apps causes the memory and disk to peek at 100% which makes developing kind of hard. So, i'm wondering, is it possible to create some kind of 'proxy' service that we run locally to forward some of our Commands, Queries and Events to another Axon instance which is running elsewhere and which has the real services connected to it so we don't have to run all our services locally. I hope i'm explaining it clearly here.
Upvotes: 2
Views: 147
Reputation: 361
Certainly an interesting scenario. Although we do not have a standard solution for this in Axon Framework at this moment, I can see some ways to implement it, in a way that you can process a subset of the commands/query locally and still using the event store and handlers for the other commands/queries in Axon Server.
The approach I would take is to extend the AxonServerCommandBus and AxonServerQueryBus classes and override the dispatch operation in the command bus and query/scatterGather operations in the query bus. These operations could filter the actions you want to process locally (based on command/query name or based on some meta data in the request) and forward the message to the localSegment (accessible through the localSegment() operation).
Hope this helps,
Marc
Upvotes: 3