Ejemplo n.º 1
0
 public void Initialize(
     [NotNull] ExchangeDeclareConfiguration exchange,
     [NotNull] QueueDeclareConfiguration queue,
     string connectionName = null)
 {
     Exchange       = Check.NotNull(exchange, nameof(exchange));
     Queue          = Check.NotNull(queue, nameof(queue));
     ConnectionName = connectionName;
     Timer.Start();
 }
Ejemplo n.º 2
0
        public IRabbitMqMessageConsumer Create(
            ExchangeDeclareConfiguration exchange,
            QueueDeclareConfiguration queue,
            string connectionName = null)
        {
            var consumer = ServiceScope.ServiceProvider.GetRequiredService <RabbitMqMessageConsumer>();

            consumer.Initialize(exchange, queue, connectionName);
            return(consumer);
        }