Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
 internal static void InvokeNodeDisconnect(ClusterEventArgs e)
 {
     NodeDisconnect?.Invoke(e);
 }