public void Send(AddPeerSubscription message) { var key = new SubscriptionKey(message.MessageName, message.CorrelationId); if (_log.IsDebugEnabled) { _log.DebugFormat("AddPeerSubscription: {0}, {1}", message.MessageName, message.SubscriptionId); } EndpointSubscription subscription = _messageSubscriptions[key]; subscription.Send(message); }
public void Send(AddPeerSubscription message) { EndpointSubscription subscription; if (!_messageSubscriptions.TryGetValue(message.MessageName, out subscription)) { subscription = new EndpointSubscription(_fiber, _scheduler, message.MessageName, _observer); _messageSubscriptions.Add(message.MessageName, subscription); } if (_log.IsDebugEnabled) _log.DebugFormat("AddPeerSubscription: {0}, {1}", message.MessageName, message.SubscriptionId); subscription.Send(message); }
public void Send(AddPeerSubscription message) { var key = new SubscriptionKey { MessageName = message.MessageName, CorrelationId = message.CorrelationId, }; EndpointSubscription subscription; if (!_messageSubscriptions.TryGetValue(key, out subscription)) { subscription = new EndpointSubscription(_fiber, _scheduler, message.MessageName, message.CorrelationId, _observer); _messageSubscriptions.Add(key, subscription); } if (_log.IsDebugEnabled) _log.DebugFormat("AddPeerSubscription: {0}, {1}", message.MessageName, message.SubscriptionId); subscription.Send(message); }