Registry / other / akka-persistence-2-11

akka-persistence-2-11

JSON →
library2.5.32javamavenunverified

Enables stateful actors to persist their state for fault tolerance and recovery in Akka applications.

<dependency> <groupId>com.typesafe.akka</groupId> <artifactId>akka-persistence_2.11</artifactId> <version>2.5.32</version> </dependency>
INSTALL
IMPORT
SIG · AKKA-PERSISTENCE-2
A
akka-persistence-2-11
otherjavav2.5.32
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PersistentActor
akka.persistence.PersistentActor

Defines a persistent actor that persists messages.

import akka.actor.ActorSystem; import akka.actor.Props; import akka.persistence.PersistentActor; class MyPersistentActor extends PersistentActor { @Override public String persistenceId() { return "my-id"; } @Override public Receive createReceiveRecover() { return receiveBuilder().build(); } @Override public Receive createReceive() { return receiveBuilder().match(String.class, msg -> persist(msg, evt -> {})).build(); } } public class Example { public static void main(String[] args) { ActorSystem system = ActorSystem.create(); system.actorOf(Props.create(MyPersistentActor.class)); } }
Debug
Known issues
gotchaAkka Persistence requires a journal plugin (e.g., LevelDB, Cassandra) configured in application.conf.
fix
Add a dependency like akka-persistence-cassandra and configure the journal plugin.
affects: all
Upgrade
Version history
2.5.32latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
28
Meta
1
OpenAI (training)
1
Resources
akka-persistence-2-11 — mvn dependency:get akka-persistence-2-11 · libregistry