Hello,
I have a MasterActor where a router is defined and that is where I defined
the following supervisionStrategy:
override val supervisorStrategy = OneForOneStrategy() {
case _: FileNotFoundException =>
println("****** Failed actor in FileNotFound: " + sender)
Restart
}
I then passed this supervisionStrategy to the router:
val router = context.actorOf(RemoteRouterConfig(RoundRobinPool(3,
supervisorStrategy=supervisorStrategy),
addresses).props(Props(classOf[MapActor], reduceActor)), "router")
I think this part is right, based on the Akka documentation.
I have 2 issues so far:
Issue #1:
I noticed that sender is deadLetters in the print statement. Why is that?
I expected sender to be one of the routees.
Issue #2:
I put a print statement in the postRestart method and I see that only one
routee is restarted when a FileNotFound exception is encountered and the
processing of the continues. That seems like the correct behavior
If I change the supervisorStrategy to Stop (shown below), I see that ALL
actors stop and I do not ANY processing taking place, at all. I expected
to see processing occur by all actors. When the failed actor hits the
FileNotFound exception, I thought that ONLY that actor should be stopped
and the others should continue processing.
override val supervisorStrategy = OneForOneStrategy() {
case _: FileNotFoundException =>
println("****** Failed actor in FileNotFound: " + sender)
Stop
}
Given the above observations, I am afraid I have not set this up properly.
Thanks in advance
--
>>>>>>>>>> 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.