public RabbitMqListeningAgent(Uri address, ITransportLogger logger, IEnvelopeMapper mapper,
                               RabbitMqAgent agent)
 {
     _logger = logger;
     _mapper = mapper;
     _agent  = agent;
     Address = address;
     _queue  = agent.QueueName;
 }
Beispiel #2
0
        public RabbitMqSender(ITransportLogger logger, RabbitMqAgent agent,
                              CancellationToken cancellation)
        {
            _mapper       = agent.EnvelopeMapping;
            _logger       = logger;
            _agent        = agent;
            _cancellation = cancellation;
            Destination   = agent.Uri;

            _address = agent.PublicationAddress();
        }
        public RabbitMqAgent For(Uri uri)
        {
            if (_connectionFactories.ContainsKey(uri))
            {
                return(_connectionFactories[uri]);
            }

            lock (_locker)
            {
                if (_connectionFactories.ContainsKey(uri))
                {
                    return(_connectionFactories[uri]);
                }


                var agent = new RabbitMqAgent(uri);

                _connectionFactories[uri] = agent;

                return(agent);
            }
        }
 public RabbitMQListeningAgent(Uri address, ITransportLogger logger, IModel channel, IEnvelopeMapper mapper, RabbitMqAgent agent)
 {
     _logger  = logger;
     _channel = channel;
     _mapper  = mapper;
     Address  = address;
     _queue   = agent.QueueName;
 }