public async Task <ISendTransport> GetSendTransport(Uri address) { var queueName = address.AbsolutePath.Split('/').Last(); return(await _index.Get(queueName, async key => { if (_log.IsDebugEnabled) { _log.DebugFormat("Creating send transport for exchange: {0}", queueName); } var exchange = _messageFabric.GetExchange(queueName); var transport = new InMemorySendTransport(exchange); return transport; })); }
public async Task <ISendTransport> GetSendTransport(Uri address) { if (_sendEndpointProvider == null || _publishEndpointProvider == null || _topology == null) { throw new NotSupportedException("Okay, so somehow a send transport was requested first."); } var queueName = address.AbsolutePath.Split('/').Last(); return(await _index.Get(queueName, async key => { if (_log.IsDebugEnabled) { _log.DebugFormat("Creating send transport for exchange: {0}", queueName); } var exchange = _messageFabric.GetExchange(queueName); var inMemorySendTransport = new InMemorySendTransport(exchange); return inMemorySendTransport; })); }