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
1 answer

requirement failed: default journal plugin is not configured, see 'reference.conf'

i get error during working with persistentActor with cassandra i cant find wheres the problem is even i added cassandra as journal in application.conf file error [ERROR] [04/29/2020 14:55:57.517] [main-akka.actor.default-dispatcher-3]…
user9116815
  • 23
  • 1
  • 10
0
votes
2 answers

Get ActorRef to previously spawned EventSourcedBehavior

We are using event sourcing with Akka Persistence by extending EventSourcedBehavior. When we create the persistent actor we give it an unique name, by using an uuid (the same we use inside create to build the PersistenceId, for entity…
franDayz
  • 883
  • 10
  • 22
0
votes
1 answer

akka.persistence.typed.internal.JournalFailureException: Exception during recovery. How to solve it?

Using Akka persistence I get this exception: Caused by: akka.persistence.typed.internal.JournalFailureException: Exception during recovery. Last known sequence number [0]. PersistenceId [PersistenceExample], due to: Cannot construct instance …
AM13
  • 661
  • 1
  • 8
  • 18
0
votes
1 answer

Serializing message with protobuf for akka actor which contains serializable data

I have a persistent actor which can receive one type of command Persist(event) where event is a type of trait Event (there are numerous implementations of it). And on success, this reponds with Persisted(event) to the sender. The event itself is…
Niks
  • 4,802
  • 4
  • 36
  • 55
0
votes
1 answer

driver default retry policy

I am testing our cassandra cluster for resiliency, its a 9 node cluster with rf=3. When i disable all traffic on port 7000 of one node, the client gets a com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query…
np-hard
  • 5,725
  • 6
  • 52
  • 76
0
votes
0 answers

akka.net persistence custom serializer is not getting invoked

I am working on Akka.net persistence and using MongoDb as the persistent store. One of the properties on the events that we persist is of custom struct type "Rational". We have configured a custom serializer for this Rational type that serializes…
Suraj Gharat
  • 75
  • 1
  • 6
0
votes
2 answers

Keep an Entity as State or Child Actor in Akka

Consider the use case of an online shopping, where I have an inventory and items. I see couple options to model this using Akka actors. Create a persistent actor called Inventory, keeping the items in its state inside a list, for example. Create a…
Andre Fagundes
  • 131
  • 2
  • 8
0
votes
1 answer

do akka streams provide guaranteed delivery

the following is from the documentation (akka): Delivery guarantees Stream refs utilise normal actor messaging for their trainsport, and therefore provide the same level of basic delivery guarantees. Stream refs do extend the semantics somewhat,…
user3038404
  • 331
  • 5
  • 14
0
votes
1 answer

Akka persistence - remove messages from journal (or mark as confirmed), when recieve confirmation of message delivery

So for eg: I have actor X and Y. Actor X persists message to journal, then it sends message to Y. Y receives message, and sends confirmation back to X to let it know have received message. When X receives this confirmation, I want it to a) delete…
user3038404
  • 331
  • 5
  • 14
0
votes
1 answer

Which persistence plugins are supported by akka-typed & cluster sharding

I'm playing around with Akka Typed (version 2.6.0) & event sourcing, and I was able to make it work with LevelDB plugin. Since I intend to use a cluster environment, LevelDB wouldn't work on such setup, since it storages data on local file system,…
0
votes
1 answer

Testing AKKA 2.6 persistence actor typed (alternatives to Kill and PoisonPill)

I have a test on an "Akka Classic" actor the is testing the persistence. The logic is simple: Create an actor and send a bunch of events. Stop the actor using akka.actor.Kill or akka.actor.PoisonKill depending on the test. Start the actor again and…
angelcervera
  • 3,699
  • 1
  • 40
  • 68
0
votes
1 answer

Losing event publishing in Persistent Actor on crash

In this example from Akka persistance documentation val receiveRecover: Receive = { case evt: Evt => updateState(evt) case SnapshotOffer(_, snapshot: ExampleState) => state = snapshot } val…
artur
  • 1,710
  • 1
  • 13
  • 28
0
votes
1 answer

I want to send filtering predicate to persistent actor, what may be wrong with this?

I have a persistent actor which holds some values. I need to get some filtered ones of them. So, I have two ways: 1) Create new message say GetValuesWithNameAndAgeGraterThan(name: String, age: Int) pro: immutable, orthodox :) contra: the problem…
Igor Yudnikov
  • 434
  • 1
  • 6
  • 14
0
votes
1 answer

Clearing Messages From a persistent Akka journal

I am testing a persistent Akka actor. I am using in-memory persistence for this. The test starts and I see the actor recovering persisted messages. I try the following: I send a message to the actor that makes it trigger deleteMessages(LastMessage).…
Gakuo
  • 845
  • 6
  • 26
0
votes
1 answer

Opendaylight scalability

We are using Nitrogen-SR3 version of Opendaylight. We want to support more NEs, and during our testing observed "Shards" missing. While analyzing this issue we noticed Shards are missing as LevelDB is not acknowledging the writes as it is very busy.…
satlearner
  • 335
  • 3
  • 14