/// <summary> /// Occurs when a new node joins. /// </summary> /// <param name="e"></param> private static void OnNodeConnect(ClusterEventArgs e) { // The node to notify var node = e.Node; // Send current subscriptions foreach (var sub in Index.GetAllValues()) { // We're only interested in subscriptions with clients connected if (sub.MessageSubscribers.Length == 0) { continue; } sub.NotifySubscribe(node); } }
internal static void InvokeNodeDisconnect(ClusterEventArgs e) { NodeDisconnect?.Invoke(e); }