コード例 #1
0
        void NotifyListenersOnTopic(ForwardedSubscriptionRequest message)
        {
            var notifiables = _cache.Values
                .Where(x => x.TopicPattern.Matches(message.Topic).Count != 0)
                .SelectMany(x => x.Notifiables)
                .ToList();

            Log.DebugFormat("Notifying interactors[{0}] of subscription {1}", string.Join(",", notifiables), message);

            foreach (var notifiable in notifiables)
                notifiable.SendMessage(message);
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: rob-blackbourn/TopicBus
 void RaiseOnForwardedSubscriptionRequest(ForwardedSubscriptionRequest message)
 {
     if (OnForwardedSubscription != null)
         OnForwardedSubscription(message.ClientId, message.Topic, message.IsAdd);
 }