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 build a custom supervisor strategy when an actor fails with CircuitBreakerOpenException and an actor needs to be restarted. If I just choose Restart strategy, the actor will be restarted immediately which doesn't make sense since it will immediately fail again within resetTimeout interval. So the correct behavior would be to wait XXX seconds and then use Restart directive. But this behavior can't be expressed in terms of actor supervision strategy.
What is the right way to implement such behavior? I can of course add a try/catch handle in the child actor implementation, but this goes against the actor supervision concept.