public ISendingAgent AgentForLocalQueue(string queueName) { queueName = queueName ?? TransportConstants.Default; if (_localSenders.TryFind(queueName, out var agent)) { return(agent); } agent = GetOrBuildSendingAgent($"local://{queueName}".ToUri()); _localSenders = _localSenders.AddOrUpdate(queueName, agent); return(agent); }
public void AddSendingAgent(ISendingAgent sendingAgent) { _senders = _senders.AddOrUpdate(sendingAgent.Destination, sendingAgent); }