private void Handle(SystemMessage.BecomeShutdown message)
 {
     Log.Info("========== [{0}] IS SHUT DOWN.", _nodeInfo.InternalHttp);
     _state = VNodeState.Shutdown;
     try
     {
         _outputBus.Publish(message);
     }
     catch (Exception exc)
     {
         Log.ErrorException(exc, "Error when publishing {0}.", message);
     }
     if (_exitProcessOnShutdown)
     {
         try
         {
             _node.WorkersHandler.Stop();
             _mainQueue.RequestStop();
         }
         catch (Exception exc)
         {
             Log.ErrorException(exc, "Error when stopping workers/main queue.");
         }
         Application.Exit(ExitCode.Success, "Shutdown and exit from process was requested.");
     }
 }
 public void Handle(SystemMessage.BecomeShutdown message)
 {
     _monitoringQueue.RequestStop();
 }
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     ShutdownSubscriptions();
     Stop();
     _queuedHandler.RequestStop();
 }