Disable Coordinated-shutdown in akka

akka
java
akka-cluster
configuration

(Manoj) #1

I’m trying to disable coordinated shutdown feature in Akka(2.5.3). I added the configuration programmatically as below.

Config shutDownConfig =
ConfigFactory.parseString("{akka.coordinated-shutdown.terminate-actor-system = off\n akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off\n akka.cluster.run-coordinated-shutdown-when-down = off}");
//Below is older configuration without shutdown props       
Config regular = userConfig.getConfig(actorSystemConfigPath).withFallback(userConfig);
Config combined = shutDownConfig.withFallback(regular);
actorSystem = ActorSystem.create(actorSystemName,combined );

The problem is Akka still tries to shutdown using CoordinatedShutdown and these settings are not getting reflected in the actor system.

DEBUG 2018-07-10 15:27:11,388 [MACluster-akka.actor.default-dispatcher-18] akka.actor.CoordinatedShutdown - Performing phase [service-unbind] with [0] tasks
DEBUG 2018-07-10 15:27:11,391 [MACluster-akka.actor.default-dispatcher-18] akka.actor.CoordinatedShutdown - Performing phase [service-requests-done] with [0] tasks

I’m wondering if they are getting overridden by akka somewhere. Thanks in Advance!


(Johan Andrén) #2

You can use system.logConfiguration() to see the effective config used, maybe that could help you figuring it out?