default ---------------------------
[Child]: created. (path = akka://app/user/child, instance = my.akka.Child@1456efca)
[Child]: preStart called. (path = akka://app/user/child, instance = my.akka.Child@1456efca)
[Child]: received hello
[Child]: preRestart called with (java.lang.Exception: kaboom, Some(boom)). (path = akka://app/user/child, instance = my.akka.Child@1456efca)
[Child]: postStop called. (path = akka://app/user/child, instance = my.akka.Child@1456efca)
[ERROR] [09/18/2017 02:17:30.555] [app-akka.actor.default-dispatcher-2] [akka://app/user/child] kaboom
java.lang.Exception: kaboom
at my.akka.Child$$anonfun$receive$1.applyOrElse(BackoffSuperVisorApp.scala:35)
at akka.actor.Actor.aroundReceive(Actor.scala:514)
at akka.actor.Actor.aroundReceive$(Actor.scala:512)
at my.akka.Child.aroundReceive(BackoffSuperVisorApp.scala:10)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
at akka.actor.ActorCell.invoke(ActorCell.scala:496)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[Child]: created. (path = akka://app/user/child, instance = my.akka.Child@5ec2b9c5)
[Child]: postRestart called with (java.lang.Exception: kaboom). (path = akka://app/user/child, instance = my.akka.Child@5ec2b9c5)
[Child]: preStart called. (path = akka://app/user/child, instance = my.akka.Child@5ec2b9c5)
[Child]: received hello after normal exception
[Child]: postStop called. (path = akka://app/user/child, instance = my.akka.Child@5ec2b9c5)
[INFO] [09/18/2017 02:17:30.955] [app-akka.actor.default-dispatcher-3] [akka://app/user/child] Message [java.lang.String] without sender to Actor[akka://app/user/child#-1104979952] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
You can see that preRestart
and postRestart
ARE called with Backoff.onStop
.
backoff onStop ---------------------------
[Child]: created. (path = akka://app/user/child/myEcho, instance = my.akka.Child@6bfb3e83)
[Child]: preStart called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@6bfb3e83)
[Child]: received hello to backoff supervisor
[Child]: preRestart called with (java.lang.Exception: kaboom, Some(boom)). (path = akka://app/user/child/myEcho, instance = my.akka.Child@6bfb3e83)
[ERROR] [09/18/2017 02:17:31.855] [app-akka.actor.default-dispatcher-6] [akka://app/user/child/myEcho] kaboom
java.lang.Exception: kaboom
at my.akka.Child$$anonfun$receive$1.applyOrElse(BackoffSuperVisorApp.scala:35)
at akka.actor.Actor.aroundReceive(Actor.scala:514)
at akka.actor.Actor.aroundReceive$(Actor.scala:512)
at my.akka.Child.aroundReceive(BackoffSuperVisorApp.scala:10)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
at akka.actor.ActorCell.invoke(ActorCell.scala:496)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[Child]: postStop called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@6bfb3e83)
[Child]: created. (path = akka://app/user/child/myEcho, instance = my.akka.Child@4d80e601)
[Child]: postRestart called with (java.lang.Exception: kaboom). (path = akka://app/user/child/myEcho, instance = my.akka.Child@4d80e601)
[Child]: preStart called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@4d80e601)
[Child]: received hello to child after normal exception
[Child]: received hello to backoffSupervisorActor after normal exception
[Child]: postStop called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@4d80e601)
[Child]: created. (path = akka://app/user/child/myEcho, instance = my.akka.Child@6d3cd821)
[Child]: preStart called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@6d3cd821)
[Child]: received hello to backoffSupervisorActor after PoisonPill
[INFO] [09/18/2017 02:17:36.070] [app-akka.actor.default-dispatcher-7] [akka://app/user/child/myEcho] Message [java.lang.String] without sender to Actor[akka://app/user/child/myEcho#-1620028058] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[Child]: postStop called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@6d3cd821)
You can see that preRestart
and postRestart
are NOT called with Backoff.onFailure
.
backoff onFailure ---------------------------
[Child]: created. (path = akka://app/user/child/myEcho, instance = my.akka.Child@496dd7f5)
[Child]: preStart called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@496dd7f5)
[Child]: received hello to backoff supervisor
[Child]: postStop called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@496dd7f5)
[ERROR] [09/18/2017 02:17:36.938] [app-akka.actor.default-dispatcher-5] [akka://app/user/child/myEcho] kaboom
java.lang.Exception: kaboom
at my.akka.Child$$anonfun$receive$1.applyOrElse(BackoffSuperVisorApp.scala:35)
at akka.actor.Actor.aroundReceive(Actor.scala:514)
at akka.actor.Actor.aroundReceive$(Actor.scala:512)
at my.akka.Child.aroundReceive(BackoffSuperVisorApp.scala:10)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
at akka.actor.ActorCell.invoke(ActorCell.scala:496)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[Child]: created. (path = akka://app/user/child/myEcho, instance = my.akka.Child@2f964777)
[Child]: preStart called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@2f964777)
[Child]: received hello to backoffSupervisorActor after normal exception
[INFO] [09/18/2017 02:17:38.952] [app-akka.actor.default-dispatcher-5] [akka://app/user/child/myEcho] Message [java.lang.String] without sender to Actor[akka://app/user/child/myEcho#-893737626] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[Child]: received hello to new child ref after normal exception
[Child]: postStop called. (path = akka://app/user/child/myEcho, instance = my.akka.Child@2f964777)
[INFO] [09/18/2017 02:17:42.182] [app-akka.actor.default-dispatcher-3] [akka://app/user/child/myEcho] Message [java.lang.String] without sender to Actor[akka://app/user/child/myEcho#2043667113] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.