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());
 }
Exemple #2
0
        public IList <Peer> GetPeersHandlingMessage(MessageBinding messageBinding)
        {
            var subscriptionList = _globalSubscriptionsIndex.GetValueOrDefault(messageBinding.MessageTypeId);

            if (subscriptionList == null)
            {
                return(Array.Empty <Peer>());
            }

            return(subscriptionList.GetPeers(messageBinding.RoutingKey));
        }
Exemple #3
0
 public IList <Peer> GetPeersHandlingMessage(IMessage message)
 => GetPeersHandlingMessage(MessageBinding.FromMessage(message));