Package org.apache.kafka.streams.errors
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 org.apache.kafka.streams.errors.ProcessingExceptionHandler
ProcessingExceptionHandler.ProcessingHandlerResponse -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this class with the given key-value pairshandle(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Inspect a record and the exception received
-
Constructor Details
-
LogAndFailProcessingExceptionHandler
public LogAndFailProcessingExceptionHandler()
-
-
Method Details
-
handle
public ProcessingExceptionHandler.ProcessingHandlerResponse handle(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Description copied from interface:ProcessingExceptionHandlerInspect a record and the exception received- Specified by:
handlein interfaceProcessingExceptionHandler- Parameters:
context- Processing context metadata.record- Record where the exception occurred.exception- The actual exception.- Returns:
- Whether to continue or stop processing.
-
configure
Description copied from interface:ConfigurableConfigure this class with the given key-value pairs- Specified by:
configurein interfaceConfigurable
-