Beispiel #1
0
        public RabbitMqListener(ITransportLogger logger,
                                RabbitMqEndpoint endpoint, RabbitMqTransport transport) : base(transport)
        {
            _logger = logger;
            _mapper = endpoint.Protocol;
            Address = endpoint.Uri;

            _routingKey = endpoint.RoutingKey ?? endpoint.QueueName ?? "";
        }
 public ParallelRabbitMqListener(ITransportLogger logger,
                                 RabbitMqEndpoint endpoint, RabbitMqTransport transport)
 {
     Address = endpoint.Uri;
     for (int i = 0; i < endpoint.ListenerCount; i++)
     {
         var listener = new RabbitMqListener(logger, endpoint, transport);
         _listeners.Add(listener);
     }
 }
Beispiel #3
0
        public RabbitMqSender(RabbitMqEndpoint endpoint, RabbitMqTransport transport) : base(transport)
        {
            _protocol   = endpoint.Protocol;
            Destination = endpoint.Uri;

            _isDurable = endpoint.Mode == EndpointMode.Durable;

            _exchangeName = endpoint.ExchangeName == TransportConstants.Default ? "" : endpoint.ExchangeName;
            _key          = endpoint.RoutingKey ?? endpoint.QueueName ?? "";
        }
Beispiel #4
0
        public RabbitMqSender(ITransportLogger logger, RabbitMqEndpoint endpoint, RabbitMqTransport transport,
                              CancellationToken cancellation) : base(transport)
        {
            _protocol     = endpoint.Protocol;
            _logger       = logger;
            _cancellation = cancellation;
            Destination   = endpoint.Uri;

            _isDurable = endpoint.IsDurable;

            _exchangeName = endpoint.ExchangeName == TransportConstants.Default ? "" : endpoint.ExchangeName;
            _key          = endpoint.RoutingKey ?? endpoint.QueueName ?? "";
        }
Beispiel #5
0
 public RabbitMqExchange(string name, RabbitMqTransport parent)
 {
     _parent      = parent;
     Name         = name;
     DeclaredName = name == TransportConstants.Default ? "" : Name;
 }
 protected RabbitMqConnectionAgent(RabbitMqTransport transport)
 {
     _transport = transport;
 }