Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 public void DiscoverMessageRoute(MessageRoute messageRoute)
 => routeDiscovery.RequestRouteDiscovery(messageRoute);
Esempio n. 3
0
 public void RequestRouteDiscovery(MessageRoute messageRoute)
 => requests.TryEnqueue(messageRoute);
Esempio n. 4
0
 public void DiscoverMessageRoute(MessageRoute messageRoute)
 {
 }