public interface SenderResult<T>
SenderRecord
that was not sent to Kafka, but enables matching this response to its corresponding
request.
Results are published when the send is acknowledged based on the acknowledgement
mode configured using the option ProducerConfig.ACKS_CONFIG. If acks is not zero,
sends are retried if ProducerConfig.RETRIES_CONFIG is configured.
| Modifier and Type | Method and Description |
|---|---|
T |
correlationMetadata()
Returns the correlation metadata associated with this instance to enable this
result to be matched with the corresponding
SenderRecord that was sent to Kafka. |
Exception |
exception()
Returns the exception associated with a send failure.
|
org.apache.kafka.clients.producer.RecordMetadata |
recordMetadata()
Returns the record metadata returned by Kafka.
|
org.apache.kafka.clients.producer.RecordMetadata recordMetadata()
exception() for failure reason when record metadata is null.ProducerException exception()
Producer if send did not succeed even after
the configured retry attempts.T correlationMetadata()
SenderRecord that was sent to Kafka.