Skip to content

Synchronously writes journal and snapshot entries to configured JDBC databases so that Akka Actors can recover state

License

Notifications You must be signed in to change notification settings

dhirenshumsher/akka-persistence-jdbc

 
 

Repository files navigation

akka-persistence-jdbc

Akka-persistence-jdbc is a plugin for akka-persistence that synchronously writes journal and snapshot entries entries to a configured JDBC store. It supports writing journal messages and snapshots to two tables: the journal table and the snapshot table.

The build fails, this is because I am busy with Travis so it runs tests against all databases. Apologies.

Service Status Description
License License Apache 2.0
Travis (master) Build Status: Master master branch test
Travis (2.4.0-xx) Build Status: 2.4.0-xx 2.4.0-xx branch test
Codacy Codacy Badge Code Quality
Bintray Download Latest Version on Bintray

By setting the appropriate Journal and SnapshotStore classes in the application.conf, you can choose the following databases:

  • H2 (tested, works on 1.4.179)
  • Postgresql (tested, works on v9.4)
  • MySQL (tested, works on 5.7 MySQL Community Server (GPL))
  • Oracle XE (tested, works on Oracle XE 11g r2)

Start of Disclaimer:

This plugin should not be used in production, ever! For a good, stable and scalable solution use Apache Cassandra with the akka-persistence-cassandra plugin Only use this plug-in for study projects and proof of concepts. Please use Docker and library/cassandra You have been warned!

End of Disclaimer

Repository

To include the JDBC plugin into your sbt project, add the following lines to your build.sbt file:

SBT

resolvers += "dnvriend at bintray" at "http://dl.bintray.com/dnvriend/maven"

Maven

<repository>
  <snapshots><enabled>false</enabled></snapshots>
  <id>central</id>
  <name>bintray</name>
  <url>http://dl.bintray.com/dnvriend/maven</url>
</repository>

Latest stable release for Akka 2.3.x

SBT

libraryDependencies += "com.github.dnvriend" %% "akka-persistence-jdbc" % "1.1.9"

Maven

<dependency>
    <groupId>com.github.dnvriend</groupId>
    <artifactId>akka-persistence-jdbc_2.10</artifactId>
    <version>1.1.8</version>
</dependency>

<dependency>
    <groupId>com.github.dnvriend</groupId>
    <artifactId>akka-persistence-jdbc_2.11</artifactId>
    <version>1.1.8</version>
</dependency>

Latest stable release for Akka 2.4.x

SBT

libraryDependencies += "com.github.dnvriend" %% "akka-persistence-jdbc" % "1.2.2"

Maven

<dependency>
    <groupId>com.github.dnvriend</groupId>
    <artifactId>akka-persistence-jdbc_2.11</artifactId>
    <version>1.2.2</version>
</dependency>

Usage

The user manual has been moved to the wiki

What's new?

For the full list of what's new see [this wiki page] (https://github.com/dnvriend/akka-persistence-jdbc/wiki/Version-History).

1.2.2 (2015-10-14) - Akka v2.4.x

1.1.9 (2015-10-12) - Akka v2.3.x

  • scala 2.10.5 -> 2.10.6
  • akka 2.3.13 -> 2.3.14
  • scalikejdbc 2.2.7 -> 2.2.8

Code of Conduct

Contributors all agree to follow the W3C Code of Ethics and Professional Conduct.

If you want to take action, feel free to contact Dennis Vriend dnvriend@gmail.com. You can also contact W3C Staff as explained in W3C Procedures.

License

This source code is made available under the Apache 2.0 License. The quick summary of what this license means is available here

Have fun!

About

Synchronously writes journal and snapshot entries to configured JDBC databases so that Akka Actors can recover state

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 97.9%
  • Shell 2.1%