Search code examples
scalaakkaactorakka-supervision

Can someone explain me what means Akka Supervision parameter "withinTimeRange"?


I am new in Akka and I need a example using this parameter and tips when use it!


Solution

  • As described in the Scaladoc:

    withinTimeRange duration of the time window for maxNrOfRetries, Duration.Inf means no window

    It comes into play with the AllForOneStrategy that applies when an actor fails. The withinTimeRange parameter describes the time window within which all the actors should be retried (as opposed to the specific child that failed).

    As for an example, see the top answer in this Stack Overflow post.