sorokinigor / akka-persistence-hazelcast   1.1.1

Apache License 2.0 GitHub

A plugin for Akka Persistence, which provides a journal and a snapshot store backed by Hazelcast.

Scala versions: 2.12 2.11

Akka Persistence Hazelcast

Build Status Release 2.12 Release 2.12

Introduction

A plugin for Akka Persistence, which provides a journal and a snapshot store backed by Hazelcast. Please, consider to read the documentation for the plugin and the Hazelcast itself.

Prerequisites

The plugin is tested against:

  • Scala 2.11/2.12
  • Java 8
  • Hazelcast 3.6.x-3.8.x
  • Akka 2.4.x-2.5.x

Installation

Dependencies

The plugin works with Scala 2.11/2.12, Hazelcast 3.6.x/3.7.x/3.8.x and Akka 2.4.x/2.5.x, but does not define them as compile time dependencies. Therefore, please, make sure that you have included all the relevant dependencies in your project.

All of the examples below are for Scala 2.12. You can easily change 2.12 to 2.11 in order to get the right artifacts.

Gradle

dependencies {
    compile "com.github.sorokinigor:akka-persistence-hazelcast_2.12:1.1.0"
    compile "org.scala-lang:scala-library:2.12.1"
    compile "com.typesafe.akka:akka-persistence_2.12:2.5.3"
    compile "com.hazelcast:hazelcast:3.8.3"
}

repositories {
    mavenCentral()
}

Sbt

libraryDependencies += "com.github.sorokinigor" % "akka-persistence-hazelcast_2.12" % "1.1.0"
libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.1"
libraryDependencies += "com.typesafe.akka" % "akka-persistence_2.12" % "2.5.3"
libraryDependencies += "com.hazelcast" % "hazelcast" % "3.8.3" 

Maven

<dependency>
  <groupId>com.github.sorokinigor</groupId>
  <artifactId>akka-persistence-hazelcast_2.12</artifactId>
  <version>1.1.0</version>
</dependency>

<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-library</artifactId>
    <version>2.12.1</version>
</dependency>

<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-persistence_2.12</artifactId>
    <version>2.5.3</version>
</dependency>

<dependency>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast</artifactId>
    <version>3.8.3</version>
</dependency>

Activate plugin

Put this in a application.conf:

akka.persistence {
  journal.plugin = "hazelcast.journal"
  snapshot-store.plugin = "hazelcast.snapshot-store"
}

See more about the configuration in the reference.conf, documentation and unit tests.