Overview

The Akka Persistence Cassandra plugin allows for using Apache Cassandra as a backend for Akka Persistence and Akka Persistence Query.

Project Info

Project Info: Akka Persistence Cassandra
Artifact
com.typesafe.akka
akka-persistence-cassandra
0.101
JDK versions
Adopt OpenJDK 8
Adopt OpenJDK 11
Scala versions2.11.12, 2.12.8, 2.13.0
License
Readiness level
Since 0.54, 2017-05-30
Home pagehttps://akka.io
API documentation
Forums
Release notesGitHub releases
IssuesGitHub issues
Sourceshttps://github.com/akka/akka-persistence-cassandra

Dependencies

Maven
<dependency>
  <groupId>com.typesafe.akka</groupId>
  <artifactId>akka-persistence-cassandra_2.12</artifactId>
  <version>0.101</version>
</dependency>
<dependency>
  <groupId>com.typesafe.akka</groupId>
  <artifactId>akka-persistence-cassandra-launcher_2.12</artifactId>
  <version>0.101</version>
  <scope>test</scope>
</dependency>
sbt
libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-persistence-cassandra" % "0.101",
  "com.typesafe.akka" %% "akka-persistence-cassandra-launcher" % "0.101" % Test
)
Gradle
dependencies {
  compile group: 'com.typesafe.akka', name: 'akka-persistence-cassandra_2.12', version: '0.101',
  test group: 'com.typesafe.akka', name: 'akka-persistence-cassandra-launcher_2.12', version: '0.101'
}

The launcher artifact is a utility for starting an embedded Cassandra, useful for running tests. It can be removed if not needed.

Those versions are compatible with Cassandra 3.0.0 or higher, and it is also compatible with Cassandra 2.1.6 or higher (versions < 2.1.6 have a static column bug) if you configure cassandra-journal.cassandra-2x-compat=on in your application.conf.

This plugin depends on Akka 2.5.x and note that it is important that all akka-* dependencies are in the same version, so it is recommended to depend on them explicitly to avoid problems with transient dependencies causing an unlucky mix of versions.

The table below shows Akka Persistence Cassandra’s direct dependencies and the second tab shows all libraries it depends on transitively.

Direct dependencies
OrganizationArtifactVersionLicense
com.datastax.cassandracassandra-driver-core3.7.2Apache 2
com.github.jnrjnr-posix3.0.45Eclipse Public License - v 1.0
com.google.guavaguava27.0.1-jreThe Apache Software License, Version 2.0
com.typesafe.akkaakka-cluster-tools_2.122.5.23Apache License, Version 2.0
com.typesafe.akkaakka-persistence-query_2.122.5.23Apache License, Version 2.0
com.typesafe.akkaakka-persistence_2.122.5.23Apache License, Version 2.0
com.typesafe.akkaakka-stream_2.122.5.23Apache License, Version 2.0
org.scala-langscala-library2.12.8Apache-2.0
Dependency tree
com.datastax.cassandra    cassandra-driver-core    3.7.2    Apache 2
    com.github.jnr    jnr-ffi    2.1.8    The Apache Software License, Version 2.0
        com.github.jnr    jffi    1.2.17    The Apache Software License, Version 2.0
        com.github.jnr    jnr-x86asm    1.0.2    MIT License
        org.ow2.asm    asm-analysis    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm-commons    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm-tree    5.0.3    BSD
            org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm-util    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm    5.0.3    BSD
    com.github.jnr    jnr-posix    3.0.45    Eclipse Public License - v 1.0
        com.github.jnr    jnr-constants    0.9.9    The Apache Software License, Version 2.0
        com.github.jnr    jnr-ffi    2.1.8    The Apache Software License, Version 2.0
            com.github.jnr    jffi    1.2.17    The Apache Software License, Version 2.0
            com.github.jnr    jnr-x86asm    1.0.2    MIT License
            org.ow2.asm    asm-analysis    5.0.3    BSD
                org.ow2.asm    asm-tree    5.0.3    BSD
                    org.ow2.asm    asm    5.0.3    BSD
            org.ow2.asm    asm-commons    5.0.3    BSD
                org.ow2.asm    asm-tree    5.0.3    BSD
                    org.ow2.asm    asm    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
            org.ow2.asm    asm-util    5.0.3    BSD
                org.ow2.asm    asm-tree    5.0.3    BSD
                    org.ow2.asm    asm    5.0.3    BSD
            org.ow2.asm    asm    5.0.3    BSD
    com.google.guava    guava    27.0.1-jre    The Apache Software License, Version 2.0
        com.google.code.findbugs    jsr305    3.0.2    The Apache Software License, Version 2.0
        com.google.errorprone    error_prone_annotations    2.2.0    Apache 2.0
        com.google.guava    failureaccess    1.0.1    The Apache Software License, Version 2.0
        com.google.guava    listenablefuture    9999.0-empty-to-avoid-conflict-with-guava    The Apache Software License, Version 2.0
        com.google.j2objc    j2objc-annotations    1.1    The Apache Software License, Version 2.0
        org.checkerframework    checker-qual    2.5.2    The MIT License
        org.codehaus.mojo    animal-sniffer-annotations    1.17    MIT license
    io.dropwizard.metrics    metrics-core    3.2.2    Apache License 2.0
        org.slf4j    slf4j-api    1.7.25    MIT License
    io.netty    netty-handler    4.0.56.Final    Apache License, Version 2.0
        io.netty    netty-buffer    4.0.56.Final    Apache License, Version 2.0
            io.netty    netty-common    4.0.56.Final    Apache License, Version 2.0
        io.netty    netty-codec    4.0.56.Final    Apache License, Version 2.0
            io.netty    netty-transport    4.0.56.Final    Apache License, Version 2.0
                io.netty    netty-buffer    4.0.56.Final    Apache License, Version 2.0
                    io.netty    netty-common    4.0.56.Final    Apache License, Version 2.0
        io.netty    netty-transport    4.0.56.Final    Apache License, Version 2.0
            io.netty    netty-buffer    4.0.56.Final    Apache License, Version 2.0
                io.netty    netty-common    4.0.56.Final    Apache License, Version 2.0
    org.slf4j    slf4j-api    1.7.25    MIT License
com.github.jnr    jnr-posix    3.0.45    Eclipse Public License - v 1.0
    com.github.jnr    jnr-constants    0.9.9    The Apache Software License, Version 2.0
    com.github.jnr    jnr-ffi    2.1.8    The Apache Software License, Version 2.0
        com.github.jnr    jffi    1.2.17    The Apache Software License, Version 2.0
        com.github.jnr    jnr-x86asm    1.0.2    MIT License
        org.ow2.asm    asm-analysis    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm-commons    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm-tree    5.0.3    BSD
            org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm-util    5.0.3    BSD
            org.ow2.asm    asm-tree    5.0.3    BSD
                org.ow2.asm    asm    5.0.3    BSD
        org.ow2.asm    asm    5.0.3    BSD
com.google.guava    guava    27.0.1-jre    The Apache Software License, Version 2.0
    com.google.code.findbugs    jsr305    3.0.2    The Apache Software License, Version 2.0
    com.google.errorprone    error_prone_annotations    2.2.0    Apache 2.0
    com.google.guava    failureaccess    1.0.1    The Apache Software License, Version 2.0
    com.google.guava    listenablefuture    9999.0-empty-to-avoid-conflict-with-guava    The Apache Software License, Version 2.0
    com.google.j2objc    j2objc-annotations    1.1    The Apache Software License, Version 2.0
    org.checkerframework    checker-qual    2.5.2    The MIT License
    org.codehaus.mojo    animal-sniffer-annotations    1.17    MIT license
com.typesafe.akka    akka-cluster-tools_2.12    2.5.23    Apache License, Version 2.0
    com.typesafe.akka    akka-cluster_2.12    2.5.23    Apache License, Version 2.0
        com.typesafe.akka    akka-remote_2.12    2.5.23    Apache License, Version 2.0
            com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
                com.typesafe    config    1.3.3    Apache License, Version 2.0
                org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
                    org.scala-lang    scala-library    2.12.8    Apache-2.0
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            com.typesafe.akka    akka-protobuf_2.12    2.5.23    Apache License, Version 2.0
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            com.typesafe.akka    akka-stream_2.12    2.5.23    Apache License, Version 2.0
                com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
                    com.typesafe    config    1.3.3    Apache License, Version 2.0
                    org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
                        org.scala-lang    scala-library    2.12.8    Apache-2.0
                    org.scala-lang    scala-library    2.12.8    Apache-2.0
                com.typesafe.akka    akka-protobuf_2.12    2.5.23    Apache License, Version 2.0
                    org.scala-lang    scala-library    2.12.8    Apache-2.0
                com.typesafe    ssl-config-core_2.12    0.3.7    Apache-2.0
                    com.typesafe    config    1.3.3    Apache License, Version 2.0
                    org.scala-lang.modules    scala-parser-combinators_2.12    1.1.1    BSD 3-clause
                        org.scala-lang    scala-library    2.12.8    Apache-2.0
                    org.scala-lang    scala-library    2.12.8    Apache-2.0
                org.reactivestreams    reactive-streams    1.0.2    CC0
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            io.aeron    aeron-client    1.15.1    The Apache License, Version 2.0
                org.agrona    agrona    0.9.31    The Apache License, Version 2.0
            io.aeron    aeron-driver    1.15.1    The Apache License, Version 2.0
                io.aeron    aeron-client    1.15.1    The Apache License, Version 2.0
                    org.agrona    agrona    0.9.31    The Apache License, Version 2.0
                org.agrona    agrona    0.9.31    The Apache License, Version 2.0
            io.netty    netty    3.10.6.Final    Apache License, Version 2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    com.typesafe.akka    akka-coordination_2.12    2.5.23    Apache License, Version 2.0
        com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
            com.typesafe    config    1.3.3    Apache License, Version 2.0
            org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    org.scala-lang    scala-library    2.12.8    Apache-2.0
com.typesafe.akka    akka-persistence-query_2.12    2.5.23    Apache License, Version 2.0
    com.typesafe.akka    akka-persistence_2.12    2.5.23    Apache License, Version 2.0
        com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
            com.typesafe    config    1.3.3    Apache License, Version 2.0
            org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        com.typesafe.akka    akka-protobuf_2.12    2.5.23    Apache License, Version 2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    com.typesafe.akka    akka-stream_2.12    2.5.23    Apache License, Version 2.0
        com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
            com.typesafe    config    1.3.3    Apache License, Version 2.0
            org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        com.typesafe.akka    akka-protobuf_2.12    2.5.23    Apache License, Version 2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        com.typesafe    ssl-config-core_2.12    0.3.7    Apache-2.0
            com.typesafe    config    1.3.3    Apache License, Version 2.0
            org.scala-lang.modules    scala-parser-combinators_2.12    1.1.1    BSD 3-clause
                org.scala-lang    scala-library    2.12.8    Apache-2.0
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.reactivestreams    reactive-streams    1.0.2    CC0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    org.scala-lang    scala-library    2.12.8    Apache-2.0
com.typesafe.akka    akka-persistence_2.12    2.5.23    Apache License, Version 2.0
    com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
        com.typesafe    config    1.3.3    Apache License, Version 2.0
        org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    com.typesafe.akka    akka-protobuf_2.12    2.5.23    Apache License, Version 2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    org.scala-lang    scala-library    2.12.8    Apache-2.0
com.typesafe.akka    akka-stream_2.12    2.5.23    Apache License, Version 2.0
    com.typesafe.akka    akka-actor_2.12    2.5.23    Apache License, Version 2.0
        com.typesafe    config    1.3.3    Apache License, Version 2.0
        org.scala-lang.modules    scala-java8-compat_2.12    0.8.0    BSD 3-clause
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    com.typesafe.akka    akka-protobuf_2.12    2.5.23    Apache License, Version 2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    com.typesafe    ssl-config-core_2.12    0.3.7    Apache-2.0
        com.typesafe    config    1.3.3    Apache License, Version 2.0
        org.scala-lang.modules    scala-parser-combinators_2.12    1.1.1    BSD 3-clause
            org.scala-lang    scala-library    2.12.8    Apache-2.0
        org.scala-lang    scala-library    2.12.8    Apache-2.0
    org.reactivestreams    reactive-streams    1.0.2    CC0
    org.scala-lang    scala-library    2.12.8    Apache-2.0
org.scala-lang    scala-library    2.12.8    Apache-2.0

Library snapshots

Snapshots are published to a snapshot repository in Sonatype after every successful build on master. Add the following to your project build definition to resolve snapshots:

sbt
resolvers += Resolver.sonatypeRepo("snapshots")
Maven
<project>
...
  <repositories>
    <repository>
      <id>sonatype-snapshots</id>
      <name>Sonatype Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
  </repositories>
...
</project>
Gradle
repositories {
  maven {
    url  "https://oss.sonatype.org/content/repositories/snapshots"
  }
}

Latest published snapshot version is sonatype-badge

The snapshot documentation is updated with every snapshot build.

History

This Apache Cassandra plugin to Akka Persistence was initiated originally by Martin Krasser, @krasserm in 2014.

It moved to the Akka organisation in 2016 and the first release after that move was 0.7 in January 2016.

Contributing

Please feel free to contribute to Akka and Akka Persistence Cassandra by reporting issues you identify, or by suggesting changes to the code. Please refer to our contributing instructions to learn how it can be done.

We want Akka to strive in a welcoming and open atmosphere and expect all contributors to respect our code of conduct.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.