コード例 #1
0
        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);
        }
コード例 #2
0
		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);
		}
コード例 #3
0
		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);
		}