Combining two Axon Server Event Storage engines

Hi all,

I would like to combine two Axon Server event stores into one, with the SequenceEventStorageEngine class. One event store would contain events that were migrated from an older application, the other would contain “live” events being created by our new application. I was wondering however if this is possible at all. I would think that the two event stores would each have its own context. But what would the context of the combined event stores then be?

Thanks if anyone can clarify.

Eric,
Generally you would use different contexts for different domains. So if it is a matter of an older version and a newer version, I would suggest merging the two into a single context, with upcasters defined to convert older events to the new types. This would allow your apps to see the complete history as a single coherent stream. Of course, that does expect the two to use a comparable event model.

There are some merging strategies you can use for this, just starting with a straight copy of the old context, then adding as much as possible from the new context using a Tracking Event Processor (TEP) or a query on the Event Store (not a CQRS query). Then for the remainder, you would first set up a TEP (or several) to keep the new context in sync with what your apps are using now, then migrate the apps to the new (combined) context.

Does that make sense for your situation?

Cheers,
Bert Laverman