Event Store Plugin for Akka Persistence Build Status Version

Akka Persistence journal and snapshot-store backed by Event Store.

Scala 2.12.8/2.11.12
Akka 2.5.21
EventStore client 6.0.0

To use this plugin prior default one, add the following to application.conf:

akka.persistence {
  journal.plugin = eventstore.persistence.journal
  snapshot-store.plugin = eventstore.persistence.snapshot-store
}

To configure EventStore.JVM client, see it's reference.conf

JSON serialization

Akka serializes your messages into binary data by default. However you can add your own serializer to serialize as JSON, But make sure you extend akka.persistence.eventstore.EventStoreSerializer rather then akka.serialization.Serializer. And in case you are really going to serialize as json, please specify ContentType.Json, it will allow you to use projections.

trait EventStoreSerializer extends Serializer {
  def toEvent(o: AnyRef): EventData
  def fromEvent(event: Event, manifest: Class[_]): AnyRef
}

Please check out some real examples used in tests:

Setup

Sbt

libraryDependencies += "com.geteventstore" %% "akka-persistence-eventstore" % "6.0.0"

Maven

<dependency>
    <groupId>com.geteventstore</groupId>
    <artifactId>akka-persistence-eventstore_${scala.version}</artifactId>
    <version>6.0.0</version>
</dependency>