Class MonitorOffsetsConsumerInterceptor<K,​V>

  • Type Parameters:
    K - the key-type.
    V - the value-type
    All Implemented Interfaces:
    AutoCloseable, org.apache.kafka.clients.consumer.ConsumerInterceptor<K,​V>, org.apache.kafka.common.Configurable

    public class MonitorOffsetsConsumerInterceptor<K,​V>
    extends Object
    implements org.apache.kafka.clients.consumer.ConsumerInterceptor<K,​V>
    Default ConsumerInterceptor that is used to track consumption progress.
    • Method Detail

      • configure

        public void configure​(Map<String,​?> configs)
        Specified by:
        configure in interface org.apache.kafka.common.Configurable
      • onConsume

        public org.apache.kafka.clients.consumer.ConsumerRecords<K,​V> onConsume​(org.apache.kafka.clients.consumer.ConsumerRecords<K,​V> records)
        Specified by:
        onConsume in interface org.apache.kafka.clients.consumer.ConsumerInterceptor<K,​V>
      • onCommit

        public void onCommit​(Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets)
        Specified by:
        onCommit in interface org.apache.kafka.clients.consumer.ConsumerInterceptor<K,​V>
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.apache.kafka.clients.consumer.ConsumerInterceptor<K,​V>