Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ProductionExceptionHandler.java

Changes:

  • Adding the public getter ProducerRecord<byte[], byte[]> deadLetterQueueRecord; attribute () in the ProductionExceptionHandlerResponse
  • As the ErrorHandlerContext does not provide the sourceKey/Value in the handle method to limit the memory impact, the Dead Letter Queue record would only contains metadata. handleSerializationException is not impacted.

...

DeserializationExceptionHandler.java

Changes:

  • Adding the public getter ProducerRecord<byte[], byte[]> deadLetterQueueRecord; attribute () in the DeserializationExceptionHandlerResponse DeserializationHandlerResponse 
Code Block
languagejava
public interface DeserializationExceptionHandler extends Configurable {

   ...

   /**
    * Enumeration that describes the response from the exception handler.
    */
   enum DeserializationHandlerResponse {
        . . .

       public Iterable<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]> deadLetterQueueRecords();

       public DeserializationHandlerResponse andAddToDeadLetterQueue(Iterable<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> deadLetterQueueRecords);
   }
}

ProcessingExceptionHandler.java

Changes:

  • Adding the public getter ProducerRecord<byte[], byte[]> deadLetterQueueRecord; attribute () in the ProcessingExceptionHandlerResponse ProcessingExceptionHandlerResponse
Code Block
languagejava
public interface DeserializationExceptionHandlerProcessingExceptionHandler extends Configurable {

   ...

   /**
    * Enumeration that describes the response from the exception handler.
    */
   enum ProcessingHandlerResponse {
        . . .

       public Iterable<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]> deadLetterQueueRecords();

       public ProcessingHandlerResponse andAddToDeadLetterQueue(Iterable<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> deadLetterQueueRecords);
   }
}

...