Coder Social home page Coder Social logo

carrot-garden / akka_eventstore.akka.persistence Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eventstore/eventstore.akka.persistence

0.0 2.0 0.0 413 KB

Event Store Journal for Akka Persistence

License: BSD 3-Clause "New" or "Revised" License

Scala 100.00%

akka_eventstore.akka.persistence's Introduction

Event Store Journal and Snapshot Store for Akka Persistence Build Status

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

Scala 2.10.4/2.11.2
Akka 2.3.6
eventstore-client 1.0.1

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

  • Maven:

Add to pom.xml

    <dependency>
        <groupId>com.geteventstore</groupId>
        <artifactId>akka-persistence-eventstore_2.11</artifactId>
        <version>1.1.0</version>
    </dependency>
  • Sbt

Add to build.sbt

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

akka_eventstore.akka.persistence's People

Contributors

t3hnar avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.