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())); } }
public void OnNext(NodeHealth value) { Bus.Publish(Configuration.MeshChannel, value); }
public void OnNext( NodeHealth value ) { Bus.Publish( Configuration.MeshChannel, value ); }