Ejemplo n.º 1
0
 public MessageConsumerBase(ITransportLogger logger, IModel channel,
                            IRabbitMqProtocol mapper, Uri address) : base(channel)
 {
     _logger  = logger;
     _channel = channel;
     Mapper   = mapper;
     _address = address;
 }
Ejemplo n.º 2
0
        public RabbitMqListener(ITransportLogger logger,
                                RabbitMqEndpoint endpoint, RabbitMqTransport transport) : base(transport)
        {
            _logger = logger;
            _mapper = endpoint.Protocol;
            Address = endpoint.Uri;

            _routingKey = endpoint.RoutingKey ?? endpoint.QueueName ?? "";
        }
Ejemplo n.º 3
0
 public RabbitMqListeningAgent(Uri address, ITransportLogger logger, IRabbitMqProtocol mapper,
                               RabbitMqEndpoint agent)
 {
     _logger = logger;
     _mapper = mapper;
     _agent  = agent;
     Address = address;
     _queue  = agent.TransportUri.QueueName;
 }
Ejemplo n.º 4
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 ?? "";
        }
Ejemplo n.º 5
0
        public RabbitMqSender(ITransportLogger logger, RabbitMqEndpoint endpoint,
                              CancellationToken cancellation)
        {
            _protocol     = endpoint.Protocol;
            _logger       = logger;
            _endpoint     = endpoint;
            _cancellation = cancellation;
            Destination   = endpoint.TransportUri.ToUri();

            _address = new PublicationAddress(endpoint.ExchangeType.ToString(), endpoint.ExchangeName ?? "", endpoint.TransportUri.QueueName);
        }
Ejemplo n.º 6
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 ?? "";
        }
 /// <summary>
 /// Override the header protocol for outgoing messages at this location. This is mostly
 /// useful for integrating Jasper with non-Jasper applications
 /// </summary>
 /// <param name="protocol"></param>
 /// <returns></returns>
 public RabbitMqListenerConfiguration Protocol(IRabbitMqProtocol protocol)
 {
     endpoint.Protocol = protocol;
     return(this);
 }
 public HandlerPipelineMessageConsumer(RabbitMqSender sender, IHandlerPipeline pipeline, ITransportLogger logger, IModel channel, IRabbitMqProtocol mapper, Uri address) : base(logger, channel, mapper, address)
 {
     _sender   = sender;
     _pipeline = pipeline;
 }
Ejemplo n.º 9
0
 public WorkerQueueMessageConsumer(IListeningWorkerQueue callback, ITransportLogger logger, IModel channel,
                                   IRabbitMqProtocol mapper, Uri address) : base(logger, channel, mapper, address)
 {
     _callback = callback;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Override the header protocol for outgoing messages at this location. This is mostly
 /// useful for integrating Jasper with non-Jasper applications
 /// </summary>
 /// <param name="protocol"></param>
 /// <returns></returns>
 public RabbitMqSubscriberConfiguration Protocol(IRabbitMqProtocol protocol)
 {
     _endpoint.Protocol = protocol;
     return this;
 }