Interface CommitManager
- All Known Implementing Classes:
AbstractCommitManager,AsyncCommitManager,CommitToOffsetManager,NoopCommitManager,SyncCommitManager
public interface CommitManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()Commits everything that has been cachedvoidcommit(org.apache.kafka.common.TopicPartition partition) Commits the offsets of the given partitionvoidforceCommit(org.apache.kafka.common.TopicPartition partition, long partitionLastOffset) Forcefully commits the offset of the given partitiongetManualCommit(org.apache.camel.Exchange exchange, org.apache.kafka.common.TopicPartition partition, org.apache.kafka.clients.consumer.ConsumerRecord<Object, Object> consumerRecord) voidrecordOffset(org.apache.kafka.common.TopicPartition partition, long partitionLastOffset) Record the last processed offset for future commit
-
Method Details
-
getManualCommit
KafkaManualCommit getManualCommit(org.apache.camel.Exchange exchange, org.apache.kafka.common.TopicPartition partition, org.apache.kafka.clients.consumer.ConsumerRecord<Object, Object> consumerRecord) -
commit
void commit()Commits everything that has been cached -
commit
void commit(org.apache.kafka.common.TopicPartition partition) Commits the offsets of the given partition- Parameters:
partition- the partition to commit the offsets
-
forceCommit
void forceCommit(org.apache.kafka.common.TopicPartition partition, long partitionLastOffset) Forcefully commits the offset of the given partition- Parameters:
partition- the partition to commit the offsetspartitionLastOffset- the last offset to commit
-
recordOffset
void recordOffset(org.apache.kafka.common.TopicPartition partition, long partitionLastOffset) Record the last processed offset for future commit- Parameters:
partition- the partition to commit the offsetspartitionLastOffset- the last offset to commit
-