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); }
void RaiseOnForwardedSubscriptionRequest(ForwardedSubscriptionRequest message) { if (OnForwardedSubscription != null) OnForwardedSubscription(message.ClientId, message.Topic, message.IsAdd); }