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