public interface Callback
Modifier and Type | Method and Description |
---|---|
void |
onCompletion(RecordMetadata metadata,
Exception exception)
A callback method the user can implement to provide asynchronous handling of request completion.
|
void onCompletion(RecordMetadata metadata, Exception exception)
metadata
- The metadata for the record that was sent (i.e. the partition and offset). An empty metadata
with -1 value for all fields will be returned if an error occurred.exception
- The exception thrown during processing of this record. Null if no error occurred.
Possible thrown exceptions include:
Non-Retriable exceptions (fatal, the message will never be sent):
Retriable exceptions (transient, may be covered by increasing #.retries):