예제 #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);
        }
예제 #2
0
        /// <inheritdoc />
        public bool StartProcessing()
        {
            if (_serviceHealthDependent)
            {
                _healthCheckingService.DiagnosticPassedEvent += OnDiagnosticPassed;
                _healthCheckingService.DiagnosticFailedEvent += OnDiagnosticFailed;
            }

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

            _reconnectPolling.StartPolling(CheckAndReconnect);

            return(true);
        }