ClusterResourceListener (and ClusterResourceListeners Collection)

ClusterResourceListener is the contract for objects that want to be notified about changes in the cluster metadata.

package org.apache.kafka.common;

public interface ClusterResourceListener {
  void onUpdate(ClusterResource clusterResource);

You can register a ClusterResourceListener for the following Kafka services:

  • KafkaServer and get notified when the server starts up

  • KafkaProducer and get notified when it is created and…​FIXME

  • KafkaConsumer and get notified when it is created and…​FIXME

ClusterResourceListeners Collection

ClusterResourceListeners collection holds zero or more ClusterResourceListener objects and uses them as if there were one.

ClusterResourceListeners is used when:

results matching ""

    No results matching ""