axonaxon-framework

Axon Framework: Convert XStream serialized events to Jackson Serializer in existing application


We have an application that was written using the Axon Framework. Based on the issues we are having with XStream, the idea of converting to the Jackson serializer has been proposed.

Is it possible to convert the current events in the event store to a JSON representation using configuration options in Axon or are we going to have to handle this manually?


Solution

  • Axon Framework, nor any of the extensions, provide something out of the box to achieve this. The most straightforward way to rewrite an event store is to write a basic event handling application that reads from store one and writes (with the desired adjustments) to store two.

    From an effort perspective, that's something like this: