We are migrating a monolithic application to microservices. The microservices are deployed on Kubernetes and using Amazon SNS/SQS to commnunicate with each other.
I want use Axon 4 to develop these microservices, but I don’t want to use event sourcing.
Is it possible, and recommended, use Axon Server only for communicating purpose (command bus, event bus and query bus) without store events into it?
It is possible to configure an Axon Server instance to not act as a store, by defining it as such in the configuration file.
However, if you want to use Axon Server to dispatch events, you’ll have to use it to store your events as well.
The guarantee of Axon Server to deliver the events to Tracking Event Processors in your own applications currently require the storage of the events.
I can imagine this might be configurable in the future as well, but I’d be hard pressed to give you a time frame on that right now.
Any how, long story short, yes you can use Axon Server to only route your messages, but that way you’ll lose the event routing.
Hope this helps you out.
So an alternative is using Axon Server to route distributed commands and queries and AMQP to route distributed events. Is that right?
If so, what is the best way to deal with scalability of events processor and saga processor, since they will be in subscribing mode? Election algorithm?
Maybe I’m totally mistaken. However, events and saga processors in tracking mode have something similiar to leader election, since they have the node owner saved on trackingtokens collection (I’m working with MongoDB by the way). If so, isn’t it possible to use similiar mechanisms to subscribing mode?
subscribing processors have no control over which node received which event. They just register a handler and are at the mercy of the delivery mechanism.
We do have some ideas (not very concrete yet) to also have AxonServer coordinate sending events to Subscribing processors across nodes. However, there are some challenges regarding guaranteed delivery which are much more elegantly solved with Tracking processors.
It is much more likely that we’ll introduce a retention period for data, in case events are not required for event sourcing.