Пример #1
0
 public void Initialize(
     RabbitMqExchangeDeclareConfigure exchangeDeclare,
     RabbitMqQueueDeclareConfigure queueDeclare)
 {
     ExchangeDeclare = exchangeDeclare;
     QueueDeclare    = queueDeclare;
     InitializeTimer();
 }
Пример #2
0
        public IRabbitMqMessageConsumer Create(RabbitMqExchangeDeclareConfigure exchangeDeclare, RabbitMqQueueDeclareConfigure queueDeclare)
        {
            var consumer = (DefaultRabbitMqMessageConsumer)ActivatorUtilities.CreateInstance(_serviceScopeFactory.CreateScope().ServiceProvider,
                                                                                             typeof(DefaultRabbitMqMessageConsumer));

            consumer.Initialize(exchangeDeclare, queueDeclare);
            return(consumer);
        }