示例#1
0
 public Action <IEnvelope> Handle(NodeHealth message)
 {
     try
     {
         var nodeId = message.NodeId;
         if (nodeId != null)
         {
             if (!Registry.HasNode(nodeId))
             {
                 NodeChannelManager.AddNewOutgoingChannel(nodeId);
                 Registry.AddNode(nodeId);
             }
             Registry.RebalanceNode(nodeId, message.LoadScore);
         }
         return(x => x.Acknowledge());
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return(x => x.Reject(e.ToString()));
     }
 }
示例#2
0
 public void OnNext(NodeHealth value)
 {
     Bus.Publish(Configuration.MeshChannel, value);
 }
示例#3
0
 public void OnNext( NodeHealth value )
 {
     Bus.Publish( Configuration.MeshChannel, value );
 }