Class SeekPolicyKafkaConsumerResumeAdapter
- java.lang.Object
-
- org.apache.camel.component.kafka.consumer.support.SeekPolicyKafkaConsumerResumeAdapter
-
- All Implemented Interfaces:
KafkaConsumerResumeAdapter
,org.apache.camel.resume.ResumeAdapter
public class SeekPolicyKafkaConsumerResumeAdapter extends Object implements KafkaConsumerResumeAdapter
A resume strategy that uses Camel's seekTo configuration for resuming
-
-
Constructor Summary
Constructors Constructor Description SeekPolicyKafkaConsumerResumeAdapter(SeekPolicy seekPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
resume()
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.
-
-
-
Constructor Detail
-
SeekPolicyKafkaConsumerResumeAdapter
public SeekPolicyKafkaConsumerResumeAdapter(SeekPolicy seekPolicy)
-
-
Method Detail
-
setConsumer
public void setConsumer(org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Description copied from interface:KafkaConsumerResumeAdapter
Sets the Kafka consumer instance for the adapter. Please note that the Kafka consumer is not safe for concurrent access- Specified by:
setConsumer
in interfaceKafkaConsumerResumeAdapter
- Parameters:
consumer
- the consumer instance
-
setKafkaResumable
public void setKafkaResumable(KafkaResumable kafkaResumable)
Description copied from interface:KafkaConsumerResumeAdapter
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.- Specified by:
setKafkaResumable
in interfaceKafkaConsumerResumeAdapter
- Parameters:
kafkaResumable
- the resumable instance
-
resume
public void resume()
- Specified by:
resume
in interfaceorg.apache.camel.resume.ResumeAdapter
-
-