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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure 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:ProcessingExceptionHandler
Inspect a record and the exception received- Specified by:
handle
in interfaceProcessingExceptionHandler
- Parameters:
context
- processing context metadatarecord
- record where the exception occurredexception
- the actual exception
-
configure
Description copied from interface:Configurable
Configure this class with the given key-value pairs- Specified by:
configure
in interfaceConfigurable
-