示例#1
0
 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());
 }
示例#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));
        }
示例#3
0
 public IList <Peer> GetPeersHandlingMessage(IMessage message)
 => GetPeersHandlingMessage(MessageBinding.FromMessage(message));