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

PersistenceQuery and Akka-Http zombie stream

Im atempting to stream the PersistenceQuery result with akka-http as SSE but it seems like when the http connection is closed from the client the PersistenceQuery stream is still hitting the event backend periodically. // Http part complete { …
Patrik
  • 255
  • 3
  • 11
0
votes
1 answer

Can Akka FSM be leveraged to use request level state

I'm trying to implement order system state machine behavior using Akka.Net. I found that this could be done using FSM class in Akka.Fsm. My state of object varies per request i.e. one order can be in created state while other order can be in…
Pramod Jangam
  • 316
  • 3
  • 10
0
votes
1 answer

Is is possible to decouple event type name from the persisted event?

I'd like to have some freedom in renaming of events or packages where they are placed. But currently this breaks persistence terribly. Is it possible to annotate event with some string or even uuid which will be treated as event name by persistence…
Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137
0
votes
1 answer

akka.persistence.RecoveryTimedOut: Recovery timed out, didn't get snapshot within 30000 milliseconds

I have a failing test because of the timeout. Here's what I see in log output: 2018-05-15 10:47:56.152 WARN com.datastax.driver.core.NettyUtil [UserDataServiceSpec-cassandra-plugin-default-dispatcher-27] [] [] - Found Netty's native epoll…
Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137
0
votes
1 answer

Choice of database to insert data from Scala code

I have a project written in Scala where I want to save incoming data to some database. My mentor suggested Persistence (Akka), but from what I've read it seems like that just keeps track of the state so that a former state can be recovered if it…
ryekos
  • 132
  • 1
  • 10
0
votes
0 answers

how to use both onFailure or onStop on akka backoff supervisor strategy?

In some of the akka-backoff examples I see that onStop is being used and on some others, I see that onFailure is being used, but I couldn't see an example where both are used for backoff, am I missing something? Isn't it common to backoff on both…
Jas
  • 14,493
  • 27
  • 97
  • 148
0
votes
1 answer

Is akka persist callback param just the same intance as persisted event

def persist[A](event: A)(handler: (A) ⇒ Unit): Unit def persistAll[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit For above method, is param passed to handler guaranted to be exactly the same(with same identifyHashCode) instance as the persisted…
jilen
  • 5,633
  • 3
  • 35
  • 84
0
votes
1 answer

Exception when attempting to create the jdbc tables

When connecting to Amazon RDS MySQL Aurora the lagom service throws an exception when attempting to create the jdbc tables 2018-01-16T00:11:32.891Z [[31merror[0m] akka.actor.OneForOneStrategy…
0
votes
1 answer

Does all persistent actors reside in-memory?

I have an order represented by a persistent Order Actor in Akka (say persisted in Cassandra) I have numerous orders in my system. At any point of time, does all the Order Actors reside in-memory ? or would some** of the order actors be retrieved…
VenVig
  • 645
  • 1
  • 10
  • 14
0
votes
1 answer

Akka Version mismatch in Class path Error

i am using SBT to setup Akka Persistence but it's failing with Error : Detected java.lang.NoSuchMethodError error, which MAY be caused by incompatible Akka versions on the classpath. Please note that a given Akka version MUST be the same across…
Arun Gupta
  • 810
  • 2
  • 9
  • 26
0
votes
1 answer

Akka Persistence: ReadJournal.runFold never returns

I am experimenting with Akka, and more specifically Akka Persistence, for the first time. I am ultimately trying to implement a small toy program to replicate Akka's use in an event-sourced application. I have had success up until the point where…
lyonssp
  • 117
  • 1
  • 1
  • 7
0
votes
2 answers

akka persistent actor testing events generated

By the definition of CQRS command can/should be validated and at the end even declined (if validation does not pass). As a part of my command validation I check if state transition is really needed. So let take a simple, dummy example: actor is in…
zmeda
  • 2,909
  • 9
  • 36
  • 56
0
votes
1 answer

How to externalize akka sharded actor state to redis or ignite?

I am very new to Akka clustering and working on a proof of concept. In my case i have an actor which is running on a cluster and the actor has state as a Map[String,Any]. So, for any request the actor receives it based on the incoming message it…
dks551
  • 1,113
  • 1
  • 15
  • 39
0
votes
1 answer

Change to Persistent Query from deprecated PersistentView

I'm using Akka Persistence, with LevelDB as storage plugin, in an application written in Scala. On the query-side, the current implementation uses PersistentView, which polls messages from a PersistentActor's journal by just knowing the identifier…
ryekos
  • 132
  • 1
  • 10
0
votes
1 answer

Akka.NET - Is it possible to mix AtLeastOnceDeliveryReceiveActor with Publish/Subscribe pattern?

I'd like to ask whether it's possible to implement publish/subscribe pattern (http://getakka.net/articles/clustering/distributed-publish-subscribe.html) where subscriber is an AtLeastOnceDeliveryReceiveActor…
Piotr Czarnecki
  • 1,688
  • 3
  • 14
  • 22