Exemplo n.º 1
0
        /// <inheritdoc/>
        public bool StartProcessing()
        {
            if (_subscribePolling.IsStarted)
            {
                return(false);
            }

            if (_serviceHealthDependent)
            {
                _healthCheckingService.DiagnosticPassedEvent += OnDiagnosticPassed;
                _healthCheckingService.DiagnosticFailedEvent += OnDiagnosticFailed;
            }

            _subscribePolling.StartPolling(ListenMessagesAsync);
            return(_subscribePolling.IsStarted);
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public bool StartProcessing()
        {
            if (_serviceHealthDependent)
            {
                _healthCheckingService.DiagnosticPassedEvent += OnDiagnosticPassed;
                _healthCheckingService.DiagnosticFailedEvent += OnDiagnosticFailed;
            }

            if (!StartProcessingInternal())
            {
                return(false);
            }

            _reconnectPolling.StartPolling(CheckAndReconnect);

            return(true);
        }