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

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