public IReceiveTransport GetReceiveTransport(string queueName, ReceiveEndpointContext receiveEndpointContext) { LogContext.SetCurrentIfNull(DefaultLogContext); TransportLogMessages.CreateReceiveTransport(receiveEndpointContext.InputAddress); var queue = _messageFabric.GetQueue(queueName); IDeadLetterTransport deadLetterTransport = new InMemoryMessageDeadLetterTransport(_messageFabric.GetExchange($"{queueName}_skipped")); receiveEndpointContext.GetOrAddPayload(() => deadLetterTransport); IErrorTransport errorTransport = new InMemoryMessageErrorTransport(_messageFabric.GetExchange($"{queueName}_error")); receiveEndpointContext.GetOrAddPayload(() => errorTransport); var transport = new InMemoryReceiveTransport(new Uri(_hostConfiguration.HostAddress, queueName), queue, receiveEndpointContext); Add(transport); return(transport); }
public IReceiveTransport GetReceiveTransport(string queueName, ReceiveEndpointContext receiveEndpointContext) { if (_log.IsDebugEnabled) { _log.DebugFormat("Creating receive transport for queue: {0}", queueName); } var queue = _messageFabric.GetQueue(queueName); IDeadLetterTransport deadLetterTransport = new InMemoryMessageDeadLetterTransport(_messageFabric.GetExchange($"{queueName}_skipped")); receiveEndpointContext.GetOrAddPayload(() => deadLetterTransport); IErrorTransport errorTransport = new InMemoryMessageErrorTransport(_messageFabric.GetExchange($"{queueName}_error")); receiveEndpointContext.GetOrAddPayload(() => errorTransport); var transport = new InMemoryReceiveTransport(new Uri(_hostConfiguration.HostAddress, queueName), queue, receiveEndpointContext); Add(transport); return(transport); }
public IReceiveTransport GetReceiveTransport(string queueName, IReceiveEndpointTopology topology) { if (_sendEndpointProvider == null) { _sendEndpointProvider = topology.SendEndpointProvider; } if (_publishEndpointProvider == null) { _publishEndpointProvider = topology.PublishEndpointProvider; } if (_topology == null) { _topology = topology; } if (_log.IsDebugEnabled) { _log.DebugFormat("Creating receive transport for queue: {0}", queueName); } var queue = _messageFabric.GetQueue(queueName); return(new InMemoryReceiveTransport(new Uri(_baseUri, queueName), queue, topology)); }