Exemple #1
0
        public AMQPEventEmitter(ILogger <AMQPEventEmitter> logger,
                                IOptions <QueueOptions> queueOptions,
                                IAMQPConnectionFactory connectionFactory)
        {
            this.logger            = logger;
            this.connectionFactory = connectionFactory.ConnectionFactory();
            this.queueOptions      = queueOptions.Value;

            logger.LogInformation($"Emitting events on queue {this.queueOptions.ProximityDetectedEventQueueName}");
        }
Exemple #2
0
        public RabbitMQEventSubscriber(ILogger <RabbitMQEventSubscriber> logger,
                                       IAMQPConnectionFactory connectionFactory,
                                       IOptions <QueueOptions> queueOptions,
                                       EventingBasicConsumer consumer)
        {
            this.connectionFactory = connectionFactory.ConnectionFactory();
            this.queueOptions      = queueOptions.Value;
            this.consumer          = consumer;
            this.channel           = consumer.Model;
            this.logger            = logger;

            logger.LogInformation("Created RabbitMQ event subscriber.");
            Initialize();
        }
 public RabbitMQEventingConsumer(IAMQPConnectionFactory factory) : base(factory.ConnectionFactory().CreateConnection().CreateModel())
 {
 }
 public AMQPEventingConsumer(ILogger <AMQPEventingConsumer> logger,
                             IAMQPConnectionFactory factory) : base(factory.ConnectionFactory().CreateConnection().CreateModel())
 {
 }