public interface ReceiverOffset
ReceiverRecord
is processed.Modifier and Type | Method and Description |
---|---|
void |
acknowledge()
Acknowledges the
ReceiverRecord associated with this offset. |
Mono<Void> |
commit()
Acknowledges the record associated with this instance and commits all acknowledged offsets.
|
long |
offset()
Returns the partition offset corresponding to the record to which this instance is associated.
|
org.apache.kafka.common.TopicPartition |
topicPartition()
Returns the topic partition corresponding to this instance.
|
org.apache.kafka.common.TopicPartition topicPartition()
long offset()
void acknowledge()
ReceiverRecord
associated with this offset. The offset will be committed
automatically based on the commit configuration parameters ReceiverOptions.commitInterval()
and ReceiverOptions.commitBatchSize()
. When an offset is acknowledged, it is assumed that
all records in this partition up to and including this offset have been processed.
All acknowledged offsets are committed if possible when the receiver Flux
terminates.Mono<Void> commit()
This method commits asynchronously. Mono.block()
may be invoked on the returned Mono to
wait for completion of the commit. If commit fails with RetriableCommitFailedException
the commit operation is retried ReceiverOptions.maxCommitAttempts()
times before the
returned Mono is failed.