Overview
The Apache Pekko Persistence JDBC plugin allows for using JDBC-compliant databases as backend for Apache Pekko Persistence and Apache Pekko Persistence Query.
This plugin supports both Event Sourcing and Durable State persistence modes, but does not support DurableState under the backend of MySQL.
In EventSourcing mode, pekko-persistence-jdbc writes journal and snapshot entries to a configured JDBC store. It also implements the full pekko-persistence-query API and is therefore very useful for implementing DDD-style application models using Apache Pekko and Scala for creating reactive applications.
In DurableState mode, pekko-persistence-jdbc writes state to a configured JDBC store.
Apache Pekko Persistence JDBC requires Apache Pekko current or later. It uses Slick 3.5.1 internally to access the database via JDBC, this does not require user code to make use of Slick.
Module info
- sbt
val PekkoVersion = "current" val SlickVersion = "3.5.1" libraryDependencies ++= Seq( "org.apache.pekko" %% "pekko-persistence-jdbc" % "1.1.0", "org.apache.pekko" %% "pekko-persistence-query" % PekkoVersion, "com.typesafe.slick" %% "slick" % SlickVersion, "com.typesafe.slick" %% "slick-hikaricp" % SlickVersion )
- Maven
<properties> <pekko.version>current</pekko.version> <slick.version>3.5.1</slick.version> <scala.binary.version>2.13</scala.binary.version> </properties> <dependencies> <dependency> <groupId>org.apache.pekko</groupId> <artifactId>pekko-persistence-jdbc_${scala.binary.version}</artifactId> <version>1.1.0</version> </dependency> <dependency> <groupId>org.apache.pekko</groupId> <artifactId>pekko-persistence-query_${scala.binary.version}</artifactId> <version>${pekko.version}</version> </dependency> <dependency> <groupId>com.typesafe.slick</groupId> <artifactId>slick_${scala.binary.version}</artifactId> <version>${slick.version}</version> </dependency> <dependency> <groupId>com.typesafe.slick</groupId> <artifactId>slick-hikaricp_${scala.binary.version}</artifactId> <version>${slick.version}</version> </dependency> </dependencies>
- Gradle
def versions = [ PekkoVersion: "current", SlickVersion: "3.5.1", ScalaBinary: "2.13" ] dependencies { implementation "org.apache.pekko:pekko-persistence-jdbc_${versions.ScalaBinary}:1.1.0" implementation "org.apache.pekko:pekko-persistence-query_${versions.ScalaBinary}:${versions.PekkoVersion}" implementation "com.typesafe.slick:slick_${versions.ScalaBinary}:${versions.SlickVersion}" implementation "com.typesafe.slick:slick-hikaricp_${versions.ScalaBinary}:${versions.SlickVersion}" }
Project Info: Apache Pekko Persistence JDBC | |
---|---|
Artifact | org.apache.pekko
pekko-persistence-jdbc
1.1.0
|
JDK versions | OpenJDK 8 OpenJDK 11 OpenJDK 17 OpenJDK 21 |
Scala versions | 2.12.20, 2.13.14, 3.3.3 |
JPMS module name | pekko.persistence.jdbc |
License | |
Home page | https://pekko.apache.org/docs/pekko-persistence-jdbc/current/ |
Forums | |
Release notes | GitHub releases |
Issues | GitHub issues |
Sources | https://github.com/apache/pekko-persistence-jdbc |
Contribution policy
Contributions via GitHub pull requests are gladly accepted from their original author. 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.
Code of Conduct
Contributors all agree to follow the Apache Community Code of Conduct.
License
This source code is made available under the Apache 2.0 License.