Interface ClusterService


@DoNotImplement
public interface ClusterService
Service for cluster related configuration.

It has the following functions:

  • Adding and removing callbacks for discovery of HiveMQ cluster nodes
Since:
4.0.0, CE 2019.1
  • Method Details

    • addDiscoveryCallback

      void addDiscoveryCallback​(@NotNull ClusterDiscoveryCallback clusterDiscoveryCallback)
      Adds a ClusterDiscoveryCallback that will be used by HiveMQ to discover cluster nodes.

      Note: Extension discovery is only used by HiveMQ if <discovery> is set to <extension> in the <cluster> section of the HiveMQ config file.

      If the given callback is already added, the callback is not added once more.

      Parameters:
      clusterDiscoveryCallback - The callback to add to the cluster discovery callbacks.
      Since:
      4.0.0, CE 2019.1
    • removeDiscoveryCallback

      void removeDiscoveryCallback​(@NotNull ClusterDiscoveryCallback clusterDiscoveryCallback)
      Removes a ClusterDiscoveryCallback from the callbacks added by addDiscoveryCallback(ClusterDiscoveryCallback).

      The removed callback will not be used anymore by HiveMQ to discover cluster nodes.

      If the given callback is not added or removed already, this method does not change anything.

      Parameters:
      clusterDiscoveryCallback - The callback to remove from the cluster discovery callbacks.
      Since:
      4.0.0, CE 2019.1