Class LogAndFailProcessingExceptionHandler
java.lang.Object
org.apache.kafka.streams.errors.LogAndFailProcessingExceptionHandler
- All Implemented Interfaces:
org.apache.kafka.common.Configurable, ProcessingExceptionHandler
public class LogAndFailProcessingExceptionHandlerextends 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.ResultConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionvoidhandleError(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