diff --git a/docs/articles/actors/coordinated-shutdown.md b/docs/articles/actors/coordinated-shutdown.md index 1090648493c..2446f76a1aa 100644 --- a/docs/articles/actors/coordinated-shutdown.md +++ b/docs/articles/actors/coordinated-shutdown.md @@ -8,79 +8,7 @@ There's an `ActorSystem` extension called `CoordinatedShutdown` that will stop c The default phases and their orderings are defined in the default HOCON configuration as `akka.coordinated-shutdown.phases`, and they are defined below: -```hocon -phases { - - # The first pre-defined phase that applications can add tasks to. - # Note that more phases can be be added in the application's - # configuration by overriding this phase with an additional - # depends-on. - before-service-unbind { - } - - # Stop accepting new incoming requests in for example HTTP. - service-unbind { - depends-on = [before-service-unbind] - } - - # Wait for requests that are in progress to be completed. - service-requests-done { - depends-on = [service-unbind] - } - - # Final shutdown of service endpoints. - service-stop { - depends-on = [service-requests-done] - } - - # Phase for custom application tasks that are to be run - # after service shutdown and before cluster shutdown. - before-cluster-shutdown { - depends-on = [service-stop] - } - - # Graceful shutdown of the Cluster Sharding regions. - cluster-sharding-shutdown-region { - timeout = 10 s - depends-on = [before-cluster-shutdown] - } - - # Emit the leave command for the node that is shutting down. - cluster-leave { - depends-on = [cluster-sharding-shutdown-region] - } - - # Shutdown cluster singletons - cluster-exiting { - timeout = 10 s - depends-on = [cluster-leave] - } - - # Wait until exiting has been completed - cluster-exiting-done { - depends-on = [cluster-exiting] - } - - # Shutdown the cluster extension - cluster-shutdown { - depends-on = [cluster-exiting-done] - } - - # Phase for custom application tasks that are to be run - # after cluster shutdown and before ActorSystem termination. - before-actor-system-terminate { - depends-on = [cluster-shutdown] - } - - # Last phase. See terminate-actor-system and exit-jvm above. - # Don't add phases that depends on this phase because the - # dispatcher and scheduler of the ActorSystem have been shutdown. - actor-system-terminate { - timeout = 10 s - depends-on = [before-actor-system-terminate] - } -} -``` +[!code-hocon[Pigeon.conf](../../../src/core/Akka/Configuration/Pigeon.conf#L1019-L1091)] ## Custom Phases diff --git a/src/core/Akka/Configuration/Pigeon.conf b/src/core/Akka/Configuration/Pigeon.conf index 10796a1e71e..c51231e125d 100644 --- a/src/core/Akka/Configuration/Pigeon.conf +++ b/src/core/Akka/Configuration/Pigeon.conf @@ -1016,6 +1016,7 @@ akka { # - recover=off: If the phase fails the shutdown is aborted # and depending phases will not be executed. # depends-on=[]: Run the phase after the given phases + phases { # The first pre-defined phase that applications can add tasks to. @@ -1087,6 +1088,6 @@ akka { depends-on = [before-actor-system-terminate] } } - #//#coordinated-shutdown-phases + } }