Idea: eventstorageengine with mapDb


I am experimenting with mapDb as eventStorageEngine … the implementation stays a java collection, but it can be stored on file system ->

this is an early draft:

used like this:

fun main(args: Array<String>) {
  val db = DBMaker.fileDB("./.tmp/eventstore.db").closeOnJvmShutdown().make()
  val storage = MapDbEventStorageEngine(db)
  val embeddedEventStore = EmbeddedEventStore(storage)

  val projection = BankAccountProjection()

  val configuration = DefaultConfigurer.defaultConfiguration()
    .configureEventStore { _ -> embeddedEventStore }
      .registerEventHandler { _ -> projection })
    .registerQueryHandler { _ -> projection }

  val commandGateway = configuration.commandGateway()

  println("accounts: ${projection.accounts}")

  println("accounts: ${projection.accounts}")
  println("events: ${}")


  commandGateway.sendAndWait<Any>(DepositCommand("1", 100))
  println("accounts: ${projection.accounts}")
  println("events: ${}")


I am getting some (minor?) issues with serialization and reflection ... 

Question: What do you think about this approach? Has this been done before? Is it worth to poceed or a waste of time?
Looking forward for feedback


Hi Jan,

we have helped customers with MapDB specific implementations of an event store (used as an archive, in their case). They have eventually moved away from it, as they had some issues and upgrading versions was painful.
We’re going to do some interesting announcements next week on the AxonIQ conference (and in media thereafter) that might present a better alternative. Just hang on for a while.



Hi Allard

I am hanging on … and am getting curious … what could the intersting announcements have been … any news/links for me?


We have announced Axon 4 last week. AxonDB and AxonHub will be merged into a single product, called AxonServer. There will be an open source (and free) version available, too.
We’re working on final touches, and expect to release it on Oct 18th. There is a webinar on that day as well.

News will start flowing as of next week with further details.