Questions tagged [akka-persistence]

Akka persistence enables stateful actors to persist their internal state so that it can be recovered when an actor is started, restarted after a JVM crash or by a supervisor, or migrated in a cluster.

Akka persistence enables stateful actors to persist their internal state so that it can be recovered when an actor is started, restarted after a JVM crash or by a supervisor, or migrated in a cluster.

The key concept behind Akka persistence is that only changes to an actor's internal state are persisted but never its current state directly (except for optional snapshots). These changes are only ever appended to storage, nothing is ever mutated, which allows for very high transaction rates and efficient replication. Stateful actors are recovered by replaying stored changes to these actors from which they can rebuild internal state. This can be either the full history of changes or starting from a snapshot which can dramatically reduce recovery times. Akka persistence also provides point-to-point communication channels with at-least-once message delivery semantics.

Source: http://doc.akka.io/docs/akka/snapshot/scala/persistence.html

297 questions
4
votes
1 answer

How and Where to process AkkaPersistence persisted Events to make the information valuable and meaningful to the responsive UI?

I am quite familiar with how the PersistentActor and PersistentView work while implementing Akka Persistence. Consider the following example with the idea as far as I understand. A Scala case class Contact. case class Contact(id: String, version:…
4
votes
2 answers

Which JSON library to use when storing case objects?

I need to serialize akka events to json. Based on "What JSON library to use in Scala?" I tried several libraries. Since my serializer should know nothing of all my concrete events, the events consisting of case classes and case objects should be…
Beat Sager
  • 41
  • 2
4
votes
1 answer

How to evolve akka-persistence events in production?

Let's say we have design our system using akka-persistence. Now, we have events stored in the event-store. While, the system in production, a new feature was requested. As a result, we find the best way to go about it is to add or modify a field in…
Muhammad Farag
  • 426
  • 2
  • 12
4
votes
0 answers

Specify Storage Plugins on a Per-Actor Basis with Akka Persistence

Is it possible to provide storage plugins (for journaling and snapshotting) instantiated manually to persistent actors? (As opposed to referencing those that've been hard-coded by configuration.) In other words, rather than override journal and…
Michael Ahlers
  • 616
  • 7
  • 21
4
votes
1 answer

Akka persistence custom java plugin

I am currently in the process of writing my own plugin for the Akka SyncWriteJournal API to implement the connection with HSQLDB. The problem is that I do no understand the requirements for the method doAsyncReplayMessages. It states that it needs…
user3354890
  • 367
  • 1
  • 3
  • 10
4
votes
1 answer

Akka Persistence Cassandra with Akka 2.3.0 throwing fatal EOFException when used with Play 2.2.1

Any idea why I am getting the following error after adding Akka to my library dependencies and executing the test task? Uncaught error from thread [reactivemongo-akka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error'…
Jeff May
  • 457
  • 2
  • 16
3
votes
2 answers

Akka stateless actors with Persistent Mailboxes

I want to create an Akka Cluster with 1000s of actors. Each actor receives a message, does some calculations and writes the result into a dedicated Kafka topic. It should be deployed in a cluster, for example Kubernetes. My understanding is that -…
Archie
  • 962
  • 2
  • 9
  • 20
3
votes
0 answers

Restarting leveldb when failed to initialize in Akka

My application is designed in such a way that whenever someone tries to start it, the application will close other instances of itself. (notice that this is working as expected and should not be changed). I am using Akka and one of my Actors is a…
Ido Sorozon
  • 272
  • 1
  • 12
3
votes
0 answers

Remove old snapshots with Akka Persistence Typed

I didn't find a way (documentation and API) to remove old snapshots with Akka Persistence Typed. With the plain API, I used: override def receiveCommand: Receive = { case SaveSnapshotSuccess(metadata) => …
Damien GOUYETTE
  • 467
  • 1
  • 3
  • 11
3
votes
1 answer

Persistence for akka FSM

I`m using Akka FSM in my project and going to add persistence. The straightforward solution is to use Persistent FSM (https://doc.akka.io/docs/akka/current/persistence-fsm.html) However in the official documentation exists warning…
smaiakov
  • 470
  • 5
  • 20
3
votes
2 answers

Creating children actors in Akka Typed persistent actors

Let’s assume an application implemented using Akka Typed has a persistent actor. This persistent actor as part of its operations creates transient (or non-persistent) children actors, each child has a unique ID and these IDs are part of the…
s4nk
  • 647
  • 1
  • 9
  • 18
3
votes
1 answer

How to save streaming data using Akka Persistence

I use StreamRefs to establish streaming connections between actors in the cluster. Currently, in the writing node, I save incoming messages to the log file manually, but I wonder is it possible to replace it with persistent Sink for writing and…
Alexey Sirenko
  • 452
  • 3
  • 12
3
votes
1 answer

How to evolve Avro schema with Akka Persistence without sending schema or using a registry?

We are considering a serialization approach for our scala-based Akka Persistence app. We consider it likely that our persisted events will "evolve" over time, so we want to support schema evolution, and are considering Avro first. We'd like to avoid…
tunesmith
  • 1,030
  • 9
  • 22
3
votes
0 answers

Choosing akka persistence db

The default database for Akka persistence is LevelDB, but I saw that there are plugins for Redis, MongoDB, and others. What are the factors that I should take into account when choosing between them? In my use case, I want to use persistence for…
3
votes
1 answer

How to recreate dynamically created persisted AKKA actors after crash

I am evaluating Akka for a project and I am trying to figure out whether I can achieve High Availability of a service with Akka-Persistence by saving the actors state in a high available data store. (I am not indending to use Akka-Cluster) I…
sun
  • 97
  • 8
1 2
3
19 20