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

Akka mailbox (queue) in couchbase

We are using Akka with in-memory messages right now and no clustering of nodes. We use couchbase as our processing backend with plenty of space left. Everything works fine as long as node is live. But when any node goes down, all in-memory messages…
Jags
  • 799
  • 7
  • 19
0
votes
0 answers

akka.net can it support millions of stateful actors?

I have a hierarchy like /user/{supervisors}/{children}. There can be 10s of thousands {supervisors} and equally as many {children} per supervisor. Both have a complex state and a lot of different messages that each need to be able to handle. I…
Josh
  • 1,058
  • 9
  • 27
0
votes
1 answer

How to trigger a PersistentView update externally

According to the docs, triggering a view update externally is supposed to work like this: view ! Update(await = true|false) sending and waiting seems not to work though: view ! Update(await = true) // repeat x times does not help…
kostja
  • 60,521
  • 48
  • 179
  • 224
0
votes
2 answers

Streaming events and rule based trigger

Given Event-A, Event-B, Event-C that arrive (potentially out of order) within days of each other, I want to trigger processing to generate derivative Event-ABC once I know I have all events in the set. The events are grouped by…
smashbourne
  • 455
  • 3
  • 16
0
votes
1 answer

Akka cluster sharding doesn't work

I'm using akka 2.4.7 on Scala 2.11.8. Events are coming to extractShardId and extractEntityId but they are not being propagated to the receive method of the actor. Any ideas of what could it be? https://bitbucket.org/kuzelac/apt-billing/overview…
Reeebuuk
  • 1,363
  • 2
  • 21
  • 42
0
votes
0 answers

Akka - Ask pattern - Combine result

I am designing an actor system. centerActor need to wait result from both actor1 and actor2 to response to the client. In the centerActor: def receive: Receive ={ case request => { implicit val timeout = Timeout(1.seconds) val ask1 =…
hminle
  • 501
  • 1
  • 8
  • 19
0
votes
1 answer

When to use AKKA persistent actor

Can someone please explain me, when should/must we use persistent actor? What are the benefits and what problem does it solve (that normal actors cant solve)?
Anand
  • 601
  • 2
  • 7
  • 17
0
votes
1 answer

Using eventsByPersistenceId for getting the source of events in reverse order

I have a PersistentActor that persists events and I would like to read them in reverse order. More specifically, I would like to get a Source for the events that emits the events in reversed order. This is useful for answering queries about the last…
ale64bit
  • 6,232
  • 3
  • 24
  • 44
0
votes
1 answer

Missing parameter type for expanded function for Unit in scala

I'm trying to wrap some actor receive code in db transaction to build idempotent persistent view that handles events by updating the information in database. class TrajectoryView extends IdempotentView { override def viewId: String =…
user1685095
  • 5,787
  • 9
  • 51
  • 100
0
votes
1 answer

Akka Persistence ActorSelection path?

I am trying to understand and use akka persistence. I am new into this EventSourcing world. I am trying to get an ActorRef to list some items, I am getting this "actor name is not unique" error; so I am trying to use this actorSelection method. The…
RafaelTSCS
  • 1,234
  • 2
  • 15
  • 36
0
votes
2 answers

Akka persistence receiveRecover receives snapshots that are from other actor instances

I am experiencing unexpected behaviour when using Akka persistence. I am fairly new to Akka so apologies in advance if I have missed something obvious. I have an actor called PCNProcessor. I create an actor instance for every PCN id I have. The…
0
votes
2 answers

Is there a way to tell that persistence backend is unreachable when working with persistent actor?

I am working with a persistent actor in Scala using EventStore as a backend. Testing is specs2-based. During initialization of the spec class, inside the constructor of the other class that is being instantiated, I ask my actor for something and, if…
Yar
  • 629
  • 6
  • 17
0
votes
0 answers

Destroying PersistentActor

a question related to Akka Persistence 2.3.10 Is there a simple way to gracefully stop PersistentActor when it is no longer required? Currently, I manually delete all journal messages and snapshots from within an actor on receiving a custom…
Jiří Vypědřík
  • 1,324
  • 12
  • 24
0
votes
0 answers

Can akka persistentview receive messages in reverse order of what is persisted?

In other words, can recent history of messages be quickly accessed from a journal? Say, the persisted journal messages in order: A, B, C, D and E consecutively. Can a persistent-view receive the messages in order: E, D, C, B and then A?
0
votes
1 answer

How to persist behavior in Akka Persistence?

I have a PersistentActor which, for a given event, can mutate his state and/or his behavior. For persisting the state there's no problem, but it turns out that I need to persist the behavior also as part of the state, otherwise it won't be correctly…
ale64bit
  • 6,232
  • 3
  • 24
  • 44
1 2 3
19
20