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

How to call the Seq variant of persist?

What is the intended usage of the persist method in Akka Persistence for sequences of events? I see that there's a signature like this here: final def persist[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit but if I try to call it as in the following…
ale64bit
  • 6,232
  • 3
  • 24
  • 44
0
votes
1 answer

Fast queue on top of Chronicle Map?

We are implementing storage plugin for akka-persistence That means 2 providers, for: queue-like Journal plugin API map-like Snapshot store plugin API Since only Chronicle Map supports multi-node symmetric replication, we eliminate Chronicle Queue…
Andrei Pozolotin
  • 897
  • 3
  • 14
  • 21
0
votes
1 answer

Design of a simple REST API with Akka + Persistence

I'm building a simple REST API for generating some objects that must be created and sent periodically out of the API. The nature of the objects doesn't matter, neither the framework supporting the REST interface (Spray, Play Framework, whatever…
ale64bit
  • 6,232
  • 3
  • 24
  • 44
0
votes
2 answers

Akka's context.become strange behaviour

I'm having a strange behaviour when using context.become in a PersistentActor (Not sure if the persistence has anything to do with the cause of the problem). My code is something like: class MyActor extends PersistentActor { import context._ …
miguel
  • 714
  • 7
  • 17
0
votes
0 answers

How to intercept Akka messages in persistence view in tests?

With actors I can write something like that: val echo = system.actorOf("someActorName") echo ! "hello world" expectMsg("hello world") But how I can intercept messages which are replicated to persistence view?
Cherry
  • 31,309
  • 66
  • 224
  • 364
0
votes
1 answer

Bootstrapping data Play framework 2.3.3

I have a project in play framework that I would like to have preloaded with some data when the application is first built (after running 'activator run'). From what I understand that used to be achieved by creating a 'initial-data.yml' file in the…
rpassza
  • 226
  • 1
  • 2
  • 8
0
votes
1 answer

How to let akka event sourcing (akka-persistence) use parallel journal actors

I am testing event sourcing (akka-persistence) and wrote my own Journal plugin. But when running performance tests, I quickly noticed that not all CPU resources are used. The class which writes messages to the journal is an actor (e.g. is executes…
sebdehne
  • 332
  • 3
  • 7
0
votes
2 answers

Generating commands when events happen in Akka Persistence

I am implementing an EventSourcing application that handles a large number of original and derived data points. In short, we have an PersistentActor functioning as an Aggregate Root accepting commands: UpdateValue(name, value,…
0
votes
1 answer

Lightweight eventing Plain Futures or Akka

Have a few use cases as follow. 1)createUser API call is made via front end. Once this call succeeds, meaning data is saved to db successfully, return success to the frond end. API contract ends there between front and backend. 2)Now backend needs…
Vikas Pandya
  • 1,998
  • 1
  • 15
  • 32
-1
votes
1 answer

What happens if a sharded Actor A asks another Actor B but A is relocated before B responds?

Let's say we have two Nodes. Node 1 contains Actor A, Node 2 contains Actor B. Assume that the communication between the two actors are implemented like so: val B_ref = sharding.entityRefFor(BTypeKey, B_ID) //inside A context.ask(B_ref,…
Rey Pader
  • 83
  • 1
  • 5
-1
votes
1 answer

In Akka Typed Cluster Sharding, is it safe to persist an EntityRef for future use?

I'm currently looking at making two different persistent actors communicate with each other. In particular: Given an Actor A exists When an Actor B is spawned Then Actor B must have a reference to Actor A And Actor B must be able to continuously…
Rey Pader
  • 83
  • 1
  • 5
-1
votes
1 answer

Check if akka actor exists in a cluster

public void actorExists() throw ActorNotFound{ FiniteDuration duration = Duration.create(3, TimeUnit.SECONDS); String actorPath = "akka://test/studentid"; Await.result(actorSystem.actorSelection(actorPath).resolveOne(new…
sreekesh.s
  • 158
  • 1
  • 8
1 2 3
19
20