예제 #1
0
        public MqConsumerHost(IMqChannelProvider channelProvider,
                              IMqInitialConsumerRegistry initialConsumerRegistry,
                              IServiceProvider serviceProvider,
                              IMqStatusService mqStatusService,
                              IEnabledIndicatorService enabledIndicatorService = null,
                              ILogger <MqConsumerHost> logger = null)
        {
            _logger = logger?.Dsl();
            var messageProcessor = new QueueMessageProcessor(mqStatusService, serviceProvider, _runConsumers)
            {
                Logger = _logger
            };

            _channelMessageReceivingController = new ChannelMessageReceivingController(messageProcessor);
            _channelCallbackExceptionLogger    = new ChannelCallbackExceptionLogger(logger);
            _channelProvider         = channelProvider ?? throw new ArgumentNullException(nameof(channelProvider));
            _initialConsumerRegistry = initialConsumerRegistry ?? throw new ArgumentNullException(nameof(initialConsumerRegistry));
            _serviceProvider         = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
            _mqStatusService         = mqStatusService;
            _enabledIndicatorService = enabledIndicatorService;
        }
예제 #2
0
 public ChannelMessageReceivingController(QueueMessageProcessor messageProcessor)
 {
     _messageProcessor = messageProcessor ?? throw new ArgumentNullException(nameof(messageProcessor));
 }