Class LogAndFailProcessingExceptionHandler
java.lang.Object
org.apache.kafka.streams.errors.LogAndFailProcessingExceptionHandler
- All Implemented Interfaces:
Configurable, ProcessingExceptionHandler
public class LogAndFailProcessingExceptionHandler
extends Object
implements ProcessingExceptionHandler
Processing exception handler that logs a processing exception and then
signals the processing pipeline to stop processing more records and fail.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ProcessingExceptionHandler
ProcessingExceptionHandler.ProcessingHandlerResponse, ProcessingExceptionHandler.Response, ProcessingExceptionHandler.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this class with the given key-value pairshandleError(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Inspects a record and the exception received during processing.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ProcessingExceptionHandler
handle
-
Constructor Details
-
LogAndFailProcessingExceptionHandler
public LogAndFailProcessingExceptionHandler()
-
-
Method Details
-
handleError
public ProcessingExceptionHandler.Response handleError(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Description copied from interface:ProcessingExceptionHandlerInspects a record and the exception received during processing.- Specified by:
handleErrorin interfaceProcessingExceptionHandler- Parameters:
context- Processing context metadata.record- Record where the exception occurred.exception- The actual exception.- Returns:
- a
ProcessingExceptionHandler.Responseobject
-
configure
Description copied from interface:ConfigurableConfigure this class with the given key-value pairs- Specified by:
configurein interfaceConfigurable
-