Event Store Journal for Akka Persistence
Scala
Clone or download
Permalink
Failed to load latest commit information.
project update dependencies Jun 22, 2018
src fix test Jun 22, 2018
.gitignore update gitignore Apr 27, 2015
.travis.yml improve travis.yml Jun 22, 2018
LICENSE Update LICENSE Jan 1, 2015
README.md update dependencies Jun 22, 2018
build.sbt update dependencies Jun 22, 2018
version.sbt Setting version to 5.0.3-SNAPSHOT Jun 22, 2018

README.md

Event Store Plugin for Akka Persistence Build Status Version

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

Scala 2.12.6/2.11.12
Akka 2.5.13
EventStore client 5.0.7

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" % "5.0.1"

Maven

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