Interface KafkaConsumerResumeAdapter

  • All Superinterfaces:
    org.apache.camel.resume.ResumeAdapter
    All Known Implementing Classes:
    OffsetKafkaConsumerResumeAdapter, SeekPolicyKafkaConsumerResumeAdapter

    public interface KafkaConsumerResumeAdapter
    extends org.apache.camel.resume.ResumeAdapter
    Defines a adapters for handling resume operations. Implementations can define different ways to handle how to resume processing records. The resume runs in the scope of the Kafka Consumer thread and may run concurrently with other consumer instances when the component is set up to use more than one of them. As such, implementations are responsible for ensuring the thread-safety of the operations within the resume method.
    • Field Summary

      • Fields inherited from interface org.apache.camel.resume.ResumeAdapter

        RESUME_ADAPTER_FACTORY
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void setConsumer​(org.apache.kafka.clients.consumer.Consumer<?,​?> consumer)
      Sets the Kafka consumer instance for the adapter.
      void setKafkaResumable​(KafkaResumable kafkaResumable)
      Sets an optional resumable instance for the adapter.
      • Methods inherited from interface org.apache.camel.resume.ResumeAdapter

        resume
    • Method Detail

      • setConsumer

        void setConsumer​(org.apache.kafka.clients.consumer.Consumer<?,​?> consumer)
        Sets the Kafka consumer instance for the adapter. Please note that the Kafka consumer is not safe for concurrent access
        Parameters:
        consumer - the consumer instance
      • setKafkaResumable

        void setKafkaResumable​(KafkaResumable kafkaResumable)
        Sets an optional resumable instance for the adapter. This is usually set during partition assignment. Garanteed not to be null and safe to ignore if partition and topic information are not used.
        Parameters:
        kafkaResumable - the resumable instance