Class ConsumerSubscriptionCleaner


  • public class ConsumerSubscriptionCleaner
    extends java.lang.Object
    Encapsulates the logic for deciding if a given topic-partition should be unsubscribed and, in that case, executing the unsubscription. It is intended to operate on just on consumer instance, though it does not have direct access to it. Rather, it can only get its current assignment and unsubscribe some topic-partitions from it.
    • Constructor Summary

      Constructors 
      Constructor Description
      ConsumerSubscriptionCleaner​(long nonExistingTopicCleanupDelayMS, int sanitizeTopicSubscriptionAfterPollTimes, TopicExistenceChecker topicExistenceChecker, java.util.function.Supplier<java.util.Set<PubSubTopicPartition>> assignmentSupplier, java.util.function.IntConsumer recordNumberOfTopicsToUnsub, java.util.function.Consumer<java.util.Set<PubSubTopicPartition>> batchUnsubscribeFunction, Time time)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConsumerSubscriptionCleaner

        public ConsumerSubscriptionCleaner​(long nonExistingTopicCleanupDelayMS,
                                           int sanitizeTopicSubscriptionAfterPollTimes,
                                           TopicExistenceChecker topicExistenceChecker,
                                           java.util.function.Supplier<java.util.Set<PubSubTopicPartition>> assignmentSupplier,
                                           java.util.function.IntConsumer recordNumberOfTopicsToUnsub,
                                           java.util.function.Consumer<java.util.Set<PubSubTopicPartition>> batchUnsubscribeFunction,
                                           Time time)