package org.apache.kafka.common;
public interface ClusterResourceListener {
void onUpdate(ClusterResource clusterResource);
}
ClusterResourceListener (and ClusterResourceListeners Collection)
ClusterResourceListener
is the contract for objects that want to be notified about changes in the cluster metadata.
You can register a ClusterResourceListener
for the following Kafka services:
ClusterResourceListeners Collection
ClusterResourceListeners
collection holds zero or more ClusterResourceListener
objects and uses them as if there were one.
ClusterResourceListeners
is used when:
-
Metadata
notifies ClusterResourceListeners about every cluster metadata change -
KafkaServer
starts up