Class ProcessingExceptionHandler.Response
java.lang.Object
org.apache.kafka.streams.errors.ProcessingExceptionHandler.Response
- Enclosing interface:
ProcessingExceptionHandler
Represents the result of handling a processing exception.
The Response class encapsulates a ProcessingExceptionHandler.Result,
indicating whether processing should continue or fail, along with an optional list of
ProducerRecord instances to be sent to a dead letter queue.
-
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> Retrieves an unmodifiable list of records to be sent to the dead letter queue.fail()Creates aResponseindicating that processing should fail.Creates aResponseindicating that processing should fail.result()Retrieves the processing handler result.resume()Creates aResponseindicating that processing should continue.resume(List<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> deadLetterQueueRecords) Creates aResponseindicating that processing should continue.
-
Method Details
-
fail
public static ProcessingExceptionHandler.Response fail(List<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> deadLetterQueueRecords) Creates aResponseindicating that processing should fail.- Parameters:
deadLetterQueueRecords- the list of records to be sent to the dead letter queue; may benull.- Returns:
- a
Responsewith aProcessingExceptionHandler.Result.FAILstatus.
-
fail
Creates aResponseindicating that processing should fail.- Returns:
- a
Responsewith aProcessingExceptionHandler.Result.FAILstatus.
-
resume
public static ProcessingExceptionHandler.Response resume(List<org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>> deadLetterQueueRecords) Creates aResponseindicating that processing should continue.- Parameters:
deadLetterQueueRecords- the list of records to be sent to the dead letter queue; may benull.- Returns:
- a
Responsewith aProcessingExceptionHandler.Result.RESUMEstatus.
-
resume
Creates aResponseindicating that processing should continue.- Returns:
- a
Responsewith aProcessingExceptionHandler.Result.RESUMEstatus.
-
result
Retrieves the processing handler result.- Returns:
- the
ProcessingExceptionHandler.Resultindicating whether processing should continue or fail.
-
deadLetterQueueRecords
public List<org.apache.kafka.clients.producer.ProducerRecord<byte[],byte[]>> deadLetterQueueRecords()Retrieves an unmodifiable list of records to be sent to the dead letter queue.If the list is
null, an empty list is returned.- Returns:
- an unmodifiable list of
ProducerRecordinstances for the dead letter queue, or an empty list if no records are available.
-