Axon Server w/ external database

I’m constructing a PoC using Axon for a use case that requires the system to be bulletproof. I’m finding the Axon Server to be great for command dispatching, but a bit opaque when it comes to event storage. Is it possible to use an external database for event storage? This would give me confidence that my mission critical events are stored properly while taking advantage of the Server implementation for processing.

Hi Joel, can you elaborate on how you feel the events are opaque?

As for storing your events in another database, yes this is possible. You will need to create your own EventStore and EventStorageEngine beans. For example to create one using mongo…

Thanks Ben! I’ve seen this used for a non-Axon Server deployment. Will it work in conjunction with Axon Server? I’d like to deploy the following:

[postgresql] <-> [Axon Server] <-> [Command, Query, Web, …]

With my events in an external database I would be able to use services like AWS RDS, perform data mining, and to potentially write complex queries on the event stream if necessary. I realize that the last is probably an anti-pattern (I do need help looking up the state of an aggregate at a particular time), but I’d like the freedom to shoot myself in the foot. Finally, and really most importantly, it’s much easier to sell management on their events being housed in a battle-tested server. People ask fewer questions when they can see their data using tools that they are familiar with.

I really like using the server for the dashboard properties, where I can see all of the workers, and the state of commands and events flowing through the system. Hence why I’m hoping I can have the best of both worlds!

Yes, it works with Axon Server as well