예제 #1
0
        public IRabbitMqMessageConsumer Create(RabbitMqExchangeDeclareConfigure exchangeDeclare, RabbitMqQueueDeclareConfigure queueDeclare)
        {
            var consumer = (DefaultRabbitMqMessageConsumer)ActivatorUtilities.CreateInstance(_serviceScopeFactory.CreateScope().ServiceProvider,
                                                                                             typeof(DefaultRabbitMqMessageConsumer));

            consumer.Initialize(exchangeDeclare, queueDeclare);
            return(consumer);
        }
예제 #2
0
 public void Initialize(
     RabbitMqExchangeDeclareConfigure exchangeDeclare,
     RabbitMqQueueDeclareConfigure queueDeclare)
 {
     ExchangeDeclare = exchangeDeclare;
     QueueDeclare    = queueDeclare;
     InitializeTimer();
 }