Class ApacheKafkaProducerCallback
- java.lang.Object
-
- com.linkedin.venice.pubsub.adapter.kafka.producer.ApacheKafkaProducerCallback
-
- All Implemented Interfaces:
org.apache.kafka.clients.producer.Callback
public class ApacheKafkaProducerCallback extends java.lang.Object implements org.apache.kafka.clients.producer.Callback
A Kafka specific callback which wraps genericPubSubProducerCallback
-
-
Constructor Summary
Constructors Constructor Description ApacheKafkaProducerCallback(PubSubProducerCallback pubsubProducerCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onCompletion(org.apache.kafka.clients.producer.RecordMetadata metadata, java.lang.Exception kafkaException)
-
-
-
Constructor Detail
-
ApacheKafkaProducerCallback
public ApacheKafkaProducerCallback(PubSubProducerCallback pubsubProducerCallback)
-
-
Method Detail
-
onCompletion
public void onCompletion(org.apache.kafka.clients.producer.RecordMetadata metadata, java.lang.Exception kafkaException)
- Specified by:
onCompletion
in interfaceorg.apache.kafka.clients.producer.Callback
- Parameters:
metadata
- The metadata for the record that was sent (i.e. the partition and offset). NULL if an error occurred.kafkaException
- 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): InvalidTopicException OffsetMetadataTooLargeException RecordBatchTooLargeException RecordTooLargeException UnknownServerException Retriable exceptions (transient, may be covered by increasing #.retries): CorruptRecordException InvalidMetadataException NotEnoughReplicasAfterAppendException NotEnoughReplicasException OffsetOutOfRangeException TimeoutException UnknownTopicOrPartitionException
-
-