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
0
votes
0 answers

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `module.MyActor$State`

While trying to persist an Event and update the state of my actor, I get this exception: Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `module.MyActor$State`: non-static inner classes like…
0
votes
1 answer

Akka Persistence: How to override circuit breaker configuration?

We are working on an application using akka-persistence and akka-persistence-jdbc. Every thing works great but lately we had an issue where the database went down for a very short time and we saw persistence failing even when the database was up and…
Karan Khanna
  • 1,947
  • 3
  • 21
  • 49
0
votes
2 answers

convert akka journal event columns string value to java object

I am using aws dynamodb akka persistence API https://github.com/akka/akka-persistence-dynamodb which doesn't have a read journal API like Cassandra (Akka Persistence Query). I can write journal data to dynamodb the event column is in string java…
0
votes
1 answer

Akka: Persistence failure when replaying events

We are working on an event sourced application with akka-persistance using Oracle database as event store. The application have been running in production for sometime now. Lately we are seeing the following error in the application for some of the…
Karan Khanna
  • 1,947
  • 3
  • 21
  • 49
0
votes
1 answer

Akka persistence Cassandra, database initialisation

I am wondering what the most helpful pattern for initialising the akka-persistence database in Cassandra is. At this time, I am using a custom Docker image with the database already created. However, I do not want to rely on docker and would like to…
gervais.b
  • 2,294
  • 2
  • 22
  • 46
0
votes
1 answer

What is controlling the delay of Event Transfer in Akka Projections from Event Journal to target DB

I have an Akka Project with Akka Persistence that works perfectly, lately I integrated it with Akka Projections and it works but I have some weird phenomena that I like to ask here. When I am sending Commands to Akka they are processed and saved at…
posthumecaver
  • 1,584
  • 4
  • 16
  • 29
0
votes
1 answer

How can an event sourced entity to subscribe to state changes in another entity?

I have an events-sourced entity (C) that needs to change its state in response to state changes in another entity of a different type (P). The logic to whether the state of C should actually change is quite complex and the data to compute that lives…
0
votes
1 answer

Is it possible to rebuild snapshots when state class changes in akka-persistence?

We use EventSourcedBehavior from akka-persistence 2.6.15 for an CQRS/EventSourcing application, with akka-persistence-jdbc 4.0.0 for storing events and snapshots in PostgreSQL DB. We have state classes that we serialize with snapshots. But sometimes…
KaC
  • 613
  • 6
  • 14
0
votes
1 answer

How to persist messages in Actor and reply after failure(JVM crash)?

I'm going to use actors for more than 5000 clients to deliver messages to them when they arrive. If a client disconnects the clients messages stored in respective Actor's mailbox.But if jvm crashes all the messages in the actor mailbox will…
user17207554
0
votes
1 answer

Akka.Net in-memory persistence calls `Recover` after app restart

I'am trying to test persistence actor, but behavior is wierd. My tested actor: public class PredictionManager : ReceivePersistentActor { public override string PersistenceId => _persistanceId; public PredictionManager(string persistenceId) …
lobstar
  • 310
  • 4
  • 8
0
votes
0 answers

How can I override PersistenceTestKit config for a custom journal?

PersistenceTestKit has a constructor which takes a configuration object as an argument. This config seems to be ignored when it comes to custom journal implementation. First of all, I have no interest in implementing a custom journal, but I can't…
Thomas Eyde
  • 3,820
  • 2
  • 25
  • 32
0
votes
1 answer

How to setup akka persistence project

I'm attempting to run the sample project from How to setup akka persistence project : https://developer.lightbend.com/start/?group=akka&project=akka-samples-persistence-dc-java When I try to run the example using the command : mvn exec:java…
blue-sky
  • 51,962
  • 152
  • 427
  • 752
0
votes
1 answer

Akka Persistence: java.sql.SQLSyntaxErrorException: ORA-04043: object "SOME_SCHEMA" does not exist

I am trying to use Akka Persistence JDBC ("com.lightbend.akka" %% "akka-persistence-jdbc" % "5.0.1") with Oracle and have created the schema and tables as mentioned at oracle-create-schema.sql. In my akka-persistence-jdbc.conf I have added the…
Karan Khanna
  • 1,947
  • 3
  • 21
  • 49
0
votes
1 answer

restoring akka entity actor during node outage

Akka-Cluster module is used for clustering within the application. If we have a setup where an entity actor (we may have hundreds of actors distributed across nodes) running on a node is scheduled to receive message every 1 min, (using…
bindu
  • 23
  • 2
0
votes
2 answers

Persistent actor using jdbc dead letters

While using persistent actors and using jdbc for the journal. All messages to my persistent actor are dead letters. However, I cannot see the reason for this since I send them directly to the persistent actor. Persistent actor code: case class…
Dirac
  • 25
  • 5