Questions tagged [akka-supervision]

In Akka supervision describes a dependency relationship between actors: the supervisor delegates tasks to subordinates and therefore must respond to their failures. When a subordinate detects a failure (i.e. throws an exception), it suspends itself and all its subordinates and sends a message to its supervisor, signaling failure.

104 questions
3
votes
1 answer

Akka Cluster starding not able to register to Coordinator

I am trying to create an Akka Sharding Cluster. I want to use proxy only mode on one of the nodes just to route the message to the shard regions. I am getting the following Warning: [WARN] [02/11/2019 17:04:17.819]…
Prog_G
  • 1,539
  • 1
  • 8
  • 22
3
votes
1 answer

Does Akka Decider have access to the full failure scenario?

New to Akka. Creating a new Scala class that extends SupervisorStrategy gives me the following template to work with: class MySupervisorStrategy extends SupervisorStrategy { override def decider: Decider = ??? override def…
hotmeatballsoup
  • 385
  • 6
  • 58
  • 136
3
votes
1 answer

Akka: How to combine OneForOneStrategy and AllForOneStrategy

If I define the supervisor strategy for an actor in Scala, how can I use both the OneForOneStrategy and the AllForOneStrategy? Is there a simple way to combine them or do I have to define a custom SupervisorStrategy? Here is an example: class…
Jojo
  • 357
  • 2
  • 10
3
votes
1 answer

Prevent akka actor from restarting child actor

I'm trying to get an actor Worker to not restart its child actor SubWorker when it's restarted by it's own supervisor Mngr. I've been unsuccessful even after overriding the preRestart() and postRestart in Worker. The logs still show that SubWorker…
Kennedy
  • 2,146
  • 6
  • 31
  • 44
3
votes
3 answers

Does the child actor know that he is being resumed?

Imagine a straight-forward supervision hierarchy. The child dies. The father decides to Restart the child. When Restarted, the postRestart and friends are called, but what if the father had decided to resume the child? Does the child actor know that…
agilesteel
  • 16,775
  • 6
  • 44
  • 55
3
votes
1 answer

MaximumNumberOfRestartsWithinTimeRangeReached equivalent in Akka 2.0

In Akka 1.3.1, the supervisor received a MaximumNumberOfRestartsWithinTimeRangeReached message when the max restart limit was reached. Is there something equivalent in Akka 2.0? I can get the Terminated message, but I wanted to be able to detect…
Sanjay
  • 55
  • 4
3
votes
0 answers

In Akka 2.0, is it possible to have a clustered supervisor?

I know that proper clustering using Akka is the focus of Akka 2.1, however need to build something with what's available now. I have a multi node Akka setup and want to gracefully handle remote actors dying. However, as the system is symmetric and…
SoftMemes
  • 5,602
  • 4
  • 32
  • 61
2
votes
1 answer

Akka supervisor managing supervisors

I reckon there might be a broader question of application design using Akka hidden in here but I'll ask how does one set up a supervision tree where a "kernel" or "top" supervisor might supervise children that are other supervisors which supervisor…
Tim
  • 323
  • 1
  • 3
  • 14
2
votes
0 answers

Akka AllForOne supervisor strategy in guardian actor

I need a way to stop all the actor in an actorSystem upon certain Exception in one of the Actors. My idea was to change the default strategy of the Guardian Actor, setting an AllForOneStrategy with SupervisorStrategy.stop to every exception…
Davide
  • 90
  • 10
2
votes
1 answer

Akka: is a DeathPactException always a programming error?

I sporadically use Akka.NET in my projects, so I know the technology, can do stuff with it, but do not consider myself an expert. Although I use .NET, the question can certainly be answered by someone familiar with Akka on the JVM. Recently, I came…
Robert Petermeier
  • 4,122
  • 4
  • 29
  • 37
2
votes
1 answer

why akka-stream restart supervision doesn't restart but just resume

Consider this simple stream: Source(1 to 5) .mapAsync(1) { i => if (i % 3 == 0) Future.failed(new Exception("I don't like 3")) else Future.successful(i) } .withAttributes( …
Damien
  • 43
  • 2
2
votes
1 answer

How to change the Guardian Actor's default Supervisor Strategy Decider?

Is it possible to change the guardian's supervisor strategy to alter its default "Decider" settings. For example, it currently handles ActorKilledExceptions by stopping the child actors. How are we able to change the way it handles these exceptions…
Rakesh Sharma
  • 301
  • 1
  • 3
  • 11
2
votes
1 answer

postRestart and preRestart methods are not getting invoke in akka actots

I am following this tutorial here is my code case class ArtGroupDeleteFromES (uuidList:List[String]) class ArtGroupDeleteESActor extends Actor{ val log = LoggerFactory.getLogger(this.getClass) override def preStart() { …
swaheed
  • 3,671
  • 10
  • 42
  • 103
2
votes
1 answer

Can't get Supervisor Strategy to work in Akka.NET

I am trying to Supervisor Strategy to work. Here is an illustration of the scenario. A diagram of a demo app the implements a SupversiorStrategy I have an actor, FloorTrader that upon OnReceive(object message), creates a FederalRegulator Actor: var…
reselbob
  • 365
  • 3
  • 13
2
votes
1 answer

Akka and Backup/Fallback Actors

I am coming to Akka after spending quite a bit of time over in Hystrix-land where, like Akka, failure is a first-class citizen. In Hystrix, I might have a SaveFizzToDbCmd that attempts to save a Fizz instance to an RDB (MySQL, whatever), and a…
smeeb
  • 27,777
  • 57
  • 250
  • 447