public IList <Peer> GetPeersHandlingMessage(MessageBinding messageBinding) { return(_peerRepository.GetPeers(!_configuration.DisableDynamicSubscriptionsForDirectoryOutgoingMessages) .Where(peer => peer.Subscriptions != null && peer.Subscriptions.Any(x => x.MessageTypeId == messageBinding.MessageTypeId && x.Matches(messageBinding.RoutingKey))) .Select(peerDesc => peerDesc.Peer) .ToList()); }
public IList <Peer> GetPeersHandlingMessage(MessageBinding messageBinding) { var subscriptionList = _globalSubscriptionsIndex.GetValueOrDefault(messageBinding.MessageTypeId); if (subscriptionList == null) { return(Array.Empty <Peer>()); } return(subscriptionList.GetPeers(messageBinding.RoutingKey)); }
public IList <Peer> GetPeersHandlingMessage(IMessage message) => GetPeersHandlingMessage(MessageBinding.FromMessage(message));