Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1365

Supervision Java example wrong

$
0
0

@missourian55 wrote:

Trying to understand the supervision strategy of Akka based on this Lightbend article. It seems the article not following the Akka rules

https://developer.lightbend.com/start/?group=akka&project=akka-samples-supervision-java

  1. It has a Parent actor named “ArithmeticService” with SupervisorStrategy defined in it.
  2. Parent in #1 create a child actor named “FlakyExpressionCalculator” and it too has its own SupervisorStrategy defined in it

But SupervisorStrategy defined in # 2 is not taking effect, child actor is always escalating the exception to parent and its up to the parent to decide what to do next. This kind of makes sense after reading the rules
supervision here
https://doc.akka.io/docs/akka/current/general/supervision.html

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.

Tested with Akka 2.5.26

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1365

Trending Articles