Interface BrokerTopologyManager
- All Superinterfaces:
ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
- All Known Implementing Classes:
BrokerTopologyManagerImpl
public interface BrokerTopologyManager
extends ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTopologyListener(BrokerTopologyListener listener) Adds the topology listener.Returns the current cluster topology.Returns live topology that includes which brokers are available, who is leader for each partition, etc.voidremoveTopologyListener(BrokerTopologyListener listener) Removes the given topology listener by identity.Methods inherited from interface io.camunda.zeebe.dynamic.config.ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
onClusterConfigurationUpdated
-
Method Details
-
getTopology
BrokerClusterState getTopology()Returns live topology that includes which brokers are available, who is leader for each partition, etc. -
getClusterConfiguration
ClusterConfiguration getClusterConfiguration()Returns the current cluster topology. The topology contains the information about brokers which are part of the cluster, and the partition distribution. UnlikeBrokerClusterStatethis also includes information about brokers which are currently unreachable. -
addTopologyListener
Adds the topology listener. For each existing brokers, the listener will be notified viaBrokerTopologyListener.brokerAdded(MemberId). After that, the listener gets notified of every new broker added or removed events.- Parameters:
listener- the topology listener
-
removeTopologyListener
Removes the given topology listener by identity.- Parameters:
listener- the listener to remove
-