public DeliveryHandler(
     AcknowledgeMode acknowledgeMode,
     ExceptionMode exceptionMode,
     IMessageHandler <RabbitMQDelivery> handler,
     AsyncContextAccessor asyncContextAccessor)
 {
     this.acknowledgeMode      = acknowledgeMode;
     this.exceptionMode        = exceptionMode;
     this.handler              = handler;
     this.asyncContextAccessor = asyncContextAccessor;
 }
        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);
        }
Example #3
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);
        }