Class DefaultProductionExceptionHandler
java.lang.Object
org.apache.kafka.streams.errors.DefaultProductionExceptionHandler
- All Implemented Interfaces:
org.apache.kafka.common.Configurable,ProductionExceptionHandler
ProductionExceptionHandler that always instructs streams to fail when an exception happens while attempting to produce result records.Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.kafka.streams.errors.ProductionExceptionHandler
ProductionExceptionHandler.ProductionExceptionHandlerResponse, ProductionExceptionHandler.SerializationExceptionOriginConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Since 3.9.handle(ErrorHandlerContext context, org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]> record, Exception exception) Inspect a record that we attempted to produce, and the exception that resulted from attempting to produce it and determine to continue or stop processing.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.streams.errors.ProductionExceptionHandler
handleSerializationException, handleSerializationException
Constructor Details
DefaultProductionExceptionHandler
public DefaultProductionExceptionHandler()
Method Details
handle
@Deprecatedpublic ProductionExceptionHandler.ProductionExceptionHandlerResponse handle(org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]> record, Exception exception) Deprecated.Since 3.9. Usehandle(ErrorHandlerContext, ProducerRecord, Exception)instead.Description copied from interface:ProductionExceptionHandlerInspect a record that we attempted to produce, and the exception that resulted from attempting to produce it and determine to continue or stop processing.- Specified by:
handlein interfaceProductionExceptionHandler- Parameters:
record- The record that failed to produce.exception- The exception that occurred during production.- Returns:
- Whether to continue or stop processing, or retry the failed operation.
handle
public ProductionExceptionHandler.ProductionExceptionHandlerResponse handle(ErrorHandlerContext context, org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]> record, Exception exception) Description copied from interface:ProductionExceptionHandlerInspect a record that we attempted to produce, and the exception that resulted from attempting to produce it and determine to continue or stop processing.- Specified by:
handlein interfaceProductionExceptionHandler- Parameters:
context- The error handler context metadata.record- The record that failed to produce.exception- The exception that occurred during production.- Returns:
- Whether to continue or stop processing, or retry the failed operation.
configure