Interface CommitManager
- All Known Implementing Classes:
AbstractCommitManager
,AsyncCommitManager
,CommitToOffsetManager
,NoopCommitManager
,SyncCommitManager
public interface CommitManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
Commits everything that has been cachedvoid
commit
(org.apache.kafka.common.TopicPartition partition) Commits the offsets of the given partitionvoid
forceCommit
(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> record) void
recordOffset
(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> record) -
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
-