Class OffsetPartitionAssignmentAdapter
java.lang.Object
org.apache.camel.component.kafka.consumer.support.classic.OffsetPartitionAssignmentAdapter
- All Implemented Interfaces:
PartitionAssignmentAdapter
A resume strategy that uses Kafka's offset for resuming
-
Constructor Summary
ConstructorDescriptionOffsetPartitionAssignmentAdapter
(org.apache.camel.spi.StateRepository<String, String> offsetRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
setConsumer
(org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) Sets the Kafka consumer instance for the adapter.
-
Constructor Details
-
OffsetPartitionAssignmentAdapter
-
-
Method Details
-
setConsumer
public void setConsumer(org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) Description copied from interface:PartitionAssignmentAdapter
Sets the Kafka consumer instance for the adapter. Please note that the Kafka consumer is not safe for concurrent access- Specified by:
setConsumer
in interfacePartitionAssignmentAdapter
- Parameters:
consumer
- the consumer instance
-
handlePartitionAssignment
public void handlePartitionAssignment()- Specified by:
handlePartitionAssignment
in interfacePartitionAssignmentAdapter
-