Hi,
I have setup supervisorStrategy as following in a supervisor ActorB, the
ActorC creates and ActorC.
class ActorB extends Actor{
private var actorC: Option[ActorRef] = None
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 2,
withinTimeRange = FiniteDuration(1, TimeUnit.MINUTES),loggingEnabled =
true) {
case _: TimeoutException => Resume
case _: AskTimeoutException => Resume
}
override def preStart(): Unit = {
actorC = Some(context.actorOf(ActorC.props, "actorC"))
context.watch(actorB.get)
}
}
The ActorA is supervisor for ActorB, my understanding is that ActorB will
Resume 2 time in 1 minute in case of TimeoutException or AskTimeoutException
and afterwards it will escalate to ActorA.
class ActorA extends Actor{
private var actorB: Option[ActorRef] = None
override val supervisorStrategy = OneForOneStrategy{
case _: TimeoutException => Stop
case _: AskTimeoutException => Stop
}
override def preStart(): Unit = {
actorC = Some(context.actorOf(ActorB.props, "actorC"))
context.watch(actorB.get)
}
def receive: Receive = {
case t: Terminated => {
context.stop(self)
context.system.shutdown()
}
}
This means ActorA should shutdown system after 2 times resume strategy in 1
minute, but I don't see it is happening, not sure where I a going wrong.
Thanks
Arun
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.