public Task<ISendTransport> GetSendTransport(Uri address) { var sendSettings = address.GetSendSettings(); var host = _hosts.GetHosts(address).FirstOrDefault(); if (host == null) throw new EndpointNotFoundException("The endpoint address specified an unknown host: " + address); var clientCache = new HttpClientCache(_hosts[0].Supervisor, _receivePipe); return Task.FromResult<ISendTransport>(new HttpSendTransport(clientCache, sendSettings, _receiveObserver)); }
public Task<ISendTransport> GetSendTransport(Uri address) { var sendSettings = address.GetSendSettings(); var hostSettings = address.GetHostSettings(); var host = _hosts.FirstOrDefault(x => RabbitMqHostEqualityComparer.Default.Equals(hostSettings, x.Settings)); if (host == null) throw new EndpointNotFoundException("The endpoint address specified an unknown host: " + address); var modelCache = new RabbitMqModelCache(host.ConnectionCache, host.Supervisor, _settings); return Task.FromResult<ISendTransport>(new RabbitMqSendTransport(modelCache, sendSettings)); }