public interface OffsetCommitCallback
poll()
.Modifier and Type | Method and Description |
---|---|
void |
onComplete(Map<TopicPartition,OffsetAndMetadata> offsets,
Exception exception)
A callback method the user can implement to provide asynchronous handling of commit request completion.
|
void onComplete(Map<TopicPartition,OffsetAndMetadata> offsets, Exception exception)
offsets
- A map of the offsets and associated metadata that this callback applies toexception
- The exception thrown during processing of the request, or null if the commit completed successfullyCommitFailedException
- if the commit failed and cannot be retried.
This can only occur if you are using automatic group management with KafkaConsumer.subscribe(Collection)
,
or if there is an active group with the same groupId which is using group management.WakeupException
- if KafkaConsumer.wakeup()
is called before or while this
function is calledAuthorizationException
- if not authorized to the topic or to the
configured groupIdKafkaException
- for any other unrecoverable errors (e.g. if offset metadata
is too large or if the committed offset is invalid).