Interface ProcessingExceptionHandler
- All Superinterfaces:
org.apache.kafka.common.Configurable
- All Known Implementing Classes:
LogAndContinueProcessingExceptionHandler,LogAndFailProcessingExceptionHandler
public interface ProcessingExceptionHandler
extends org.apache.kafka.common.Configurable
An interface that allows user code to inspect a record that has failed processing
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDeprecated.static classRepresents the result of handling a processing exception.static enumEnumeration that describes the response from the exception handler. -
Method Summary
Modifier and TypeMethodDescriptionhandle(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Deprecated.handleError(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Inspects a record and the exception received during processing.Methods inherited from interface org.apache.kafka.common.Configurable
configure
-
Method Details
-
handle
@Deprecated default ProcessingExceptionHandler.ProcessingHandlerResponse handle(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Deprecated.UsehandleError(ErrorHandlerContext, Record, Exception)instead.Inspect a record and the exception received- Parameters:
context- Processing context metadata.record- Record where the exception occurred.exception- The actual exception.- Returns:
- Whether to continue or stop processing.
-
handleError
default ProcessingExceptionHandler.Response handleError(ErrorHandlerContext context, Record<?, ?> record, Exception exception) Inspects a record and the exception received during processing.- Parameters:
context- Processing context metadata.record- Record where the exception occurred.exception- The actual exception.- Returns:
- a
ProcessingExceptionHandler.Responseobject
-
handleError(ErrorHandlerContext, Record, Exception)instead.