Package org.apache.kafka.streams.errors
Class DefaultProductionExceptionHandler
java.lang.Object
org.apache.kafka.streams.errors.DefaultProductionExceptionHandler
- All Implemented Interfaces:
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.SerializationExceptionOrigin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure this class with the given key-value pairshandle
(ProducerRecord<byte[], byte[]> record, Exception exception) Deprecated.handle
(ErrorHandlerContext context, 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 whether or not to continue processing.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.kafka.streams.errors.ProductionExceptionHandler
handleSerializationException, handleSerializationException
-
Constructor Details
-
DefaultProductionExceptionHandler
public DefaultProductionExceptionHandler()
-
-
Method Details
-
handle
@Deprecated public ProductionExceptionHandler.ProductionExceptionHandlerResponse handle(ProducerRecord<byte[], byte[]> record, Exception exception) Deprecated.Description copied from interface:ProductionExceptionHandler
Inspect a record that we attempted to produce, and the exception that resulted from attempting to produce it and determine whether or not to continue processing.- Specified by:
handle
in interfaceProductionExceptionHandler
- Parameters:
record
- The record that failed to produceexception
- The exception that occurred during production
-
handle
public ProductionExceptionHandler.ProductionExceptionHandlerResponse handle(ErrorHandlerContext context, ProducerRecord<byte[], byte[]> record, Exception exception) Description copied from interface:ProductionExceptionHandler
Inspect a record that we attempted to produce, and the exception that resulted from attempting to produce it and determine whether or not to continue processing.- Specified by:
handle
in interfaceProductionExceptionHandler
- Parameters:
context
- The error handler context metadatarecord
- The record that failed to produceexception
- The exception that occurred during production
-
configure
Description copied from interface:Configurable
Configure this class with the given key-value pairs- Specified by:
configure
in interfaceConfigurable
-