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 Object implements org.apache.kafka.clients.producer.Callback
A Kafka specific callback which wraps generic PubSubProducerCallback
  • Constructor Details

    • ApacheKafkaProducerCallback

      public ApacheKafkaProducerCallback(PubSubProducerCallback pubsubProducerCallback)
  • Method Details

    • onCompletion

      public void onCompletion(org.apache.kafka.clients.producer.RecordMetadata metadata, Exception kafkaException)
      Specified by:
      onCompletion in interface org.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