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.
Questions tagged [akka-supervision]
104 questions
0
votes
1 answer
Is this a correct use case for an Akka role?
I'm updating an Akka cluster where a particular actor should start on a node within the cluster depending on a configuration value. Initially, I considered using a custom Akka cluster role and have did some research, reading…

blue-sky
- 51,962
- 152
- 427
- 752
0
votes
0 answers
akka actor supervision strategy is not working with child actors created with ActorRefFactory
i am creating child actors via ActorRefFactory so that i can inject it
i am using one-for-one supervision strategy for these child actors but when they throw the exception i can not able to see in the logs that supervision startegy is working as i…

swaheed
- 3,671
- 10
- 42
- 103
0
votes
1 answer
Akka Actors Supervision - Does 'resume' keep current message?
In Akka Actors (using Scala) one can use supervison strategies to deal with exceptions. This strategy can decide what to do with the actor, depending on the type of exception. From my understanding, there are 4 possibilible outcomes:
Resume- Let…

Astarno
- 193
- 1
- 9
0
votes
2 answers
Is it possible to define several stop messages in Akka Clustering
I am trying to configure an Akka Actor for Cluster Sharding, one thing that I am not quite sure, is it possible to configure several Stop Messages for an Entity for graceful Shutdown.
for ex, Entity configuration like following will trigger graceful…

posthumecaver
- 1,584
- 4
- 16
- 29
0
votes
1 answer
Choosing a proper actor supervisor strategy on open circuit breaker
Akka supervision strategies allows custom behavior depending on what kind of exception it thrown, so a supervisor can choose whether the failing actor should be stopped, restarted, resumed or the error is escalated to its parent. I am trying to…

Vagif Abilov
- 9,835
- 8
- 55
- 100
0
votes
1 answer
akka.net router is not terminated when broadcasting poisonpill
I am having an issue while trying akka.net routers. My round robin router does not terminate after broadcasting PoisonPill message if there is an Exception in routee which is handled using supervisorstrategy. If the exception is not throw or handled…

Bikswan
- 141
- 11
0
votes
1 answer
Why isn't my typed actor being restarted by its guardian?
I'm experimenting with Akka typed. I have a dummy actor which emulates a flaky worker:
import akka.actor.typed.Behavior
import akka.actor.typed.receptionist.{Receptionist, ServiceKey}
import akka.actor.typed.scaladsl.Behaviors
import…

erip
- 16,374
- 11
- 66
- 121
0
votes
1 answer
Akka Kafka stream supervison strategy not working
I am running an Akka Streams Kafka application and I want to incorporate the supervision strategy on the stream consumer such that if the broker goes down, and the stream consumer dies after a stop timeout, the supervisor can restart the…

dks551
- 1,113
- 1
- 15
- 39
0
votes
1 answer
What happens to messages sent to an actor while it is suspended?
Here is the situation, One my actors (A) is supervised by a Backoff supervisor (B).
The sequence of events that interest me is the following:
The system starts and everybody is happy
A fails while processing a message
B now considers A to be…

LordOfThePigs
- 11,050
- 7
- 45
- 69
0
votes
1 answer
Actor SupervisorStrategy: Handle Exceptions for Specific Child Actor
Say I have the following code:
override val supervisorStrategy: SupervisorStrategy = {
def defaultDecider: Decider = {
case _: ActorInitializationException => Stop
case _: ActorKilledException => Stop
case ce:…

Soatl
- 10,224
- 28
- 95
- 153
0
votes
1 answer
Why supervision strategy default case got invoked?
Hi I have applied supervision on Parent actor and the child is Throwing MongoTimeOutException (I intentionally raised that exception for testing purpose) but the default case got invoked in supervision.
Here is the code:
class child extends Actor {
…

swaheed
- 3,671
- 10
- 42
- 103
0
votes
0 answers
Akka BackOff Supervision Strategies
I am using akka BackOff supervision with my actor. Whenever my actor receive the message, I am getting akka dead letter msg. Followings are my logs:
[INFO] - [2016-09-16 12:18:53,843] - [akka.actor.LocalActorRef] Message…

Harmeet Singh Taara
- 6,483
- 20
- 73
- 126
0
votes
1 answer
Akka-Java: Unable to receive Future message in parent using pipe pattern
I am creating one child actor for one parent. My child actor perform some business logic and return value to scala Future. When i send Future message to my parent, i am unable to catch my future message. Following is my code:
Child Actor
public…

Harmeet Singh Taara
- 6,483
- 20
- 73
- 126
0
votes
1 answer
Akka: Custom akka supervision strategies not registered using Java
I am going to explore Akka life cycle and Akka actors supervision strategies. I am creating my own exceptions and override public SupervisorStrategy supervisorStrategy() method for exploring the life-cycle of akka and their recovery strategies.…

Harmeet Singh Taara
- 6,483
- 20
- 73
- 126
0
votes
2 answers
Akka Actor Restart After a Time lapse
I have a Supervisor actor that creates a couple of child actors. I have also defined a Supervision strategy that does a OneToOne handling:
override val supervisorStrategy =
OneForOneStrategy() {
case _ =>
logger.info("doing…

joesan
- 13,963
- 27
- 95
- 232