private void SendDiscoverMessageRouteMessage(MessageRoute messageRoute) { try { var scaleOutAddress = scaleOutConfigurationProvider.GetScaleOutAddress(); var domains = messageRoute.Receiver.IsMessageHub() ? securityProvider.GetAllowedDomains() : new[] { securityProvider.GetDomain(messageRoute.Message.Identity) }; foreach (var domain in domains) { var message = Message.Create(new DiscoverMessageRouteMessage { RequestorNodeIdentity = scaleOutAddress.Identity, RequestorUri = scaleOutAddress.Uri.ToSocketAddress(), ReceiverIdentity = messageRoute.Receiver.IsMessageHub() ? messageRoute.Receiver.Identity : null, MessageContract = messageRoute.Message != null ? new MessageContract { Version = messageRoute.Message.Version, Identity = messageRoute.Message.Identity, Partition = messageRoute.Message.Partition } : null }) .As <Message>(); message.SetDomain(domain); message.SignMessage(securityProvider); autoDiscoverySender.EnqueueMessage(message); } } catch (SecurityException err) { logger.Error(err); } }
public void DiscoverMessageRoute(MessageRoute messageRoute) => routeDiscovery.RequestRouteDiscovery(messageRoute);
public void RequestRouteDiscovery(MessageRoute messageRoute) => requests.TryEnqueue(messageRoute);
public void DiscoverMessageRoute(MessageRoute messageRoute) { }