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

access/authorization control : akka-persistence/service layer/akka-http stack

There is a web app that uses the following stack on the server: akka-persistence/service-layer/akka-http (for REST) The question is : how can I - in the most elegant, most dry way - make sure that only those users can execute a function in the…
jhegedus
  • 20,244
  • 16
  • 99
  • 167
0
votes
1 answer

Finding a previously persisted Akka actor with an indirect reference

There are quite a few places in a system I am currently building in which there are multiple ways to reach the same actor. For instance, if you have a persistent car actor, you could use the VIN or registration plate. As we need a single "true…
jameswilddev
  • 582
  • 7
  • 16
0
votes
1 answer

Is Akka ShardRegion.StartEntity message propagapted to entity actor?

I'm using Akka 2.5.2 with Scala 2.12.2. The sharding doc mentions that in order to have crashed/rebalanced shards recovering their entities, the ShardRegion.ExtractShardI must handle the ShardRegion.StartEntity message. And if an entity itself needs…
stackoverflower
  • 3,885
  • 10
  • 47
  • 71
0
votes
4 answers

Is serverless in combination with event sourcing possible?

I've been wanting to implement a mobile app using a complete serverless architecture for some time now and finally started looking into the details. So far, I've discovered that AWS offers most of the services that would be required for such a setup…
Martijn
  • 2,268
  • 3
  • 25
  • 51
0
votes
1 answer

Akka-stream filter out particular event from Cassandra

I currently have an event sourced service supported by Akka and Cassandra. This is a bidding system called AuctionService and at some point I need to retrieve the last bid event called BiddenOnLot. For that I use akka-persistence-query. Here is my…
Tíbó
  • 1,188
  • 13
  • 28
0
votes
0 answers

akka event sourcing with distributed and/or large files

I am using the book "Mastering Akka" by Christian Baxter. Now I try to build a new project with akka as event sourced system. I have a object like Folder. In this Folder could be a number of Files. Really files (java.io.File). For a locale system…
André
  • 125
  • 1
  • 8
0
votes
1 answer

Akka.net persistence actor doesn't get connection string from Fallback Config?

I have my main hocon config in app.config file and try to set connection string from code behind using fallback config. but when actor system start it doesn't working. here is my hocon config and C# code as below. Can someone help me please? Hocon…
0
votes
1 answer

How does the data in the event store look like?

I understand that event sourcing is all about storing events that represents changes in the state but not the state itself. so In my case, I get messages from Kafka and each message is encoded in JSON with 50 fields like this {key1: val1, key2:…
user1870400
  • 6,028
  • 13
  • 54
  • 115
0
votes
0 answers

Implementing Event Streams with Akka.Persistence

I've been playing around with akka persistence, and saw more than one example about persisting events for primitive types like string, and found no implementation for custom objects, I went through these slides Event sourcing in practice, and…
Geiziry
  • 23
  • 5
0
votes
1 answer

Actor ask timeout in akka-persistence

I trying a "hello-world" example with akka-persistence backed by MongoDb, using this open source, https://github.com/scullxbones/akka-persistence-mongo/tree/master/rxmongo/src. Below is my code. However, when I run the application, I got ask…
Luong Ba Linh
  • 802
  • 5
  • 20
0
votes
1 answer

Akka Persistence and Mongodb: Persistence failure when replaying events for persistenceId

I am uisng akka-persistence with mongodb using this https://github.com/ironfish/akka-persistence-mongo/ mongodb plugins. when i am running my code, i am getting following error: [ERROR] [11/19/2016 16:47:29.355]…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
0
votes
2 answers

How to recover queued messages in akka actor in case of node crash?

If node crashes and at that point of time messages are queued up in mailbox then how will those messages be reprocessed? If they can not be reprocessed then how can we say akka programming model is fault tolerant. This is the most basic use case…
Marut Singh
  • 345
  • 1
  • 3
  • 10
0
votes
1 answer

Purge sourced events in Akka-persistance, when testing

I am writing a module with Akka-persistance, and have run into a problem in unittesting: all the events are sourced during the test, and therefore the state changes. when i run hte test suite again, the events are replayed, so the actor does not…
Ehud Kaldor
  • 753
  • 1
  • 7
  • 20
0
votes
1 answer

How can I reset the cassandra journal between unit test?

I am testing an actor system and I would like to handle the reset of the journal between test run.
SaKou
  • 259
  • 1
  • 13
0
votes
1 answer

Akka (JVM) event-sourcing in Azure?

I am trying to deploy an Akka application on Azure, that uses the journal persistence plugin. I cannot find a working combination when it comes to the persistence plugin I should use. So far I looked into: akka-persistence-mongo and Azure Document…
CanardMoussant
  • 913
  • 8
  • 22