[Axon 3.1] What are the interfaces or abstract to implements a new Storage


What are the interfaces/abstract classes to implement to create a new storage engine in Axon 3.1?

I saw they are possibly a lot of concepts to have the full support can you describe them ?

Thank you

Epo J.

I am by no means an Axon expert, but until you get a better response, I thought that this image might help. My first instinct would be to look into extending BatchingEventStorageEngine. Of course, it really depends on your actual requirements, but that might make for a good starting point.


Thank you Brian,

I thought there would have more classes/interfaces involved as it might include stuff for replaying events etc …

JDBC and JPA implementation I read somewhere needs 5 tables, can someone detail what is the purpose for each ?

Thank you

Hi Epo,

Below you find a short description for each table, hope this helps:

  • ASSOCIATION_VALUE_ENTRY: contains the associations for all Sagas, each row is one association for one saga instance (one saga can have multiple association values)
  • DOMAIN_EVENT_ENTRY: contains all serialized domain events, each row is one event
  • SAGA_ENTRY: contains all saga instances, each row is one saga
  • SNAPSHOT_EVENT_ENTRY: contains the snapshots for aggregates, each row is one snapshot
  • TOKEN_ENTRY: contains the state of the tracking event processors, a tracking event processor can have multiple segments, each row contains the administration for one segment of a processing group: tracking token, owner, etc. (see https://docs.axonframework.org/part3/event-processing.html#parallel-processing)

Cheers, Oscar

Hi Epo,

most of the logic you’d need for the Event Store is implemented in the Event Store. The EventStorageEngine is responsible for the actual storage of events. The BatchingEventStorageEngine is a useful subclass if the storage you use doesn’t know how to directly stream data. It assumes it needs to query a stream in batches, instead of opening a stream to the underlying storage directly.

As Oscar pointed out, you will only need to create the equivalents of the DomainEventEntry and SnapshotEventEntry tables in your storage.