public void Handle(ProjectionCoreServiceMessage.SubComponentStopped message)
        {
            if (_currentState != CoreCoordinatorState.Stopping)
            {
                Log.Debug("PROJECTIONS: Projection Core Coordinator received SubComponent Stopped when not stopping. " +
                          "SubComponent: {subComponent}, CurrentState: {currentState}",
                          message.SubComponent, _currentState);
                return;
            }
            _activeSubComponents--;
            Log.Debug("PROJECTIONS: SubComponent Stopped: {subComponent}", message.SubComponent);

            if (message.SubComponent == ProjectionCoreService.SubComponentName)
            {
                if (!_queues.TryGetValue(message.QueueId, out var queue))
                {
                    return;
                }
                queue.Publish(new ReaderCoreServiceMessage.StopReader(message.QueueId));
            }

            if (_activeSubComponents == 0)
            {
                _publisher.Publish(
                    new ProjectionSubsystemMessage.ComponentStopped(ComponentName, _instanceCorrelationId));
                _currentState = CoreCoordinatorState.Stopped;
            }
        }
 void IHandle <ProjectionCoreServiceMessage.SubComponentStopped> .Handle(
     ProjectionCoreServiceMessage.SubComponentStopped message)
 {
     _externalRequestQueue.Publish(
         new ProjectionCoreServiceMessage.SubComponentStopped(message.SubComponent, message.QueueId)
         );
 }
        public void Handle(ProjectionCoreServiceMessage.SubComponentStopped message)
        {
            _activeSubComponents--;
            Log.Debug("PROJECTIONS: SubComponent Stopped: {subComponent}", message.SubComponent);

            if (_newInstanceWaiting)
            {
                StartWhenConditionsAreMet();
            }
        }