Class AbstractPartitionDiscoverer

  • Direct Known Subclasses:
    KafkaPartitionDiscoverer

    @Internal
    @Deprecated
    public abstract class AbstractPartitionDiscoverer
    extends Object
    Deprecated.
    Base class for all partition discoverers.

    This partition discoverer base class implements the logic around bookkeeping discovered partitions, and using the information to determine whether or not there are new partitions that the consumer subtask should subscribe to.

    Subclass implementations should simply implement the logic of using the version-specific Kafka clients to fetch topic and partition metadata.

    Since Kafka clients are generally not thread-safe, partition discoverers should not be concurrently accessed. The only exception for this would be the wakeup() call, which allows the discoverer to be interrupted during a discoverPartitions() call.