Migrate events from Axon Server to RDBMS EventStore

Hi,
is it possible to migrate events stored inside Axon Server to an RDBMS based EventStore?

Thanks
Damiano

Hi Damiano,
I am not sure what is the official way. If I were to do it (and I actually were) I would:

  1. write a simple app that connects to Axon Server and handles all events with a generic event handler such as:
@Service
class EventExporter {
   @EventHandler
   <T> void on(T event, DomainEventMessage<T> message) {
       // ... dump the full message (not just the event aka payload) to an external file
   }
}
  1. reconfigure my original app to use Axon Framework provided RDBMS based EventStore (either JPA or JDBC implementation, you choose). Don’t forget to exclude dependency on axon-server-connector.
  2. add a new service bean to the original app that loads the external file and just re-publish all messages using the EventGateway. Remember, you want to publish the messages not just your events. The messages contain vital information about the aggregate type and identifier, event sequence number, event timestamp and optionally your metadata.

With this re-publishing I was able quite easily to “replicate” aggregates from one event store to another.

HTH,
David

Hey @damy I don’t have an answer but I am curious about the reasons. Why do you want/need decommissioning axon server in favor of a axon-framework?

It might also be a feature request for those willing to move from server to jpa/mongo event-store and vice-versa as well

Hi,
our customer ask to us to evaluate an exit strategy if he want to dismiss Axon Server EE in favor of a solution based on open source components (Spring Cloud, RabbitMQ and JPA Event Sore)

Hello everyone,

Great discussion around it! =)
I just wanted to add this blog post we wrote a while ago which talks about migration startegies
https://axoniq.io/blog-overview/event-store-migration-and-conversion

Have you guys read about it already? It might give you some light!

KR,