Link Search Menu Expand Document

Akka Persistence Postgres

The Akka Persistence Postgres plugin allows for using Postgres database as backend for Akka Persistence and Akka Persistence Query.

akka-persistence-postgres writes journal and snapshot entries to a configured PostgreSQL store. It implements the full akka-persistence-query API and is therefore very useful for implementing DDD-style application models using Akka and Scala for creating reactive applications.

It’s been originally created as a fork of Akka Persistence JDBC plugin 4.0.0, focused on PostgreSQL features such as partitions, arrays, BRIN indexes and others. Many parts of this doc have been adopted from the original project page.

The main goal is to keep index size and memory consumption on a moderate level while being able to cope with an increasing data volume.

Installation

To use akka-persistence-postgres in your SBT project, add the following to your build.sbt:

libraryDependencies += "com.swisborg" %% "akka-persistence-postgres" % "0.6.0"

For a maven project add:

<dependency>
    <groupId>com.swisborg</groupId>
    <artifactId>akka-persistence-postgres_2.13</artifactId>
    <version>0.6.0</version>
</dependency>

to your pom.xml.

:warning: Since Akka does not allow mixed versions in a project, Akka dependencies are marked a Provided. This means that your application libraryDependencies needs to directly include Akka as a dependency. The minimal supported Akka version is 2.6.16.

Source code

Source code for this plugin can be found on GitHub.

Contribution policy

Contributions via GitHub pull requests are gladly accepted. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project’s open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project’s open source license and warrant that you have the legal authority to do so.

Contributors

List of all contributors can be found on GitHub.

Sponsors

Development and maintenance of akka-persistence-postgres is sponsored by:

SoftwareMill

SoftwareMill is a software development and consulting company. We help clients scale their business through software. Our areas of expertise include backends, distributed systems, blockchain, machine learning and data analytics.

SwissBorg

SwissBorg makes managing your crypto investment easy and helps control your wealth.

License

This source code is made available under the Apache 2.0 License.