public QueueConsumerSubscriber(
            string queue,
            AcknowledgeMode acknowledgeMode,
            ExceptionMode exceptionMode,
            IMessageHandler <RabbitMQDelivery> handler,
            AsyncContextAccessor asyncContextAccessor)
        {
            this.queue           = queue;
            this.acknowledgeMode = acknowledgeMode;

            deliveryHandler = new DeliveryHandler(acknowledgeMode, exceptionMode, handler, asyncContextAccessor);
        }
예제 #2
0
        public ExchangeBindingSubscriber(
            string exchange,
            string routingKey,
            AcknowledgeMode acknowledgeMode,
            ExceptionMode exceptionMode,
            IMessageHandler <RabbitMQDelivery> handler,
            AsyncContextAccessor asyncContextAccessor)
        {
            this.exchange        = exchange ?? string.Empty;
            this.routingKey      = routingKey ?? string.Empty;
            this.acknowledgeMode = acknowledgeMode;
            this.exceptionMode   = exceptionMode;

            deliveryHandler = new DeliveryHandler(acknowledgeMode, exceptionMode, handler, asyncContextAccessor);
        }