public interface DeserializationExceptionHandler
extends org.apache.kafka.common.Configurable| Modifier and Type | Interface and Description |
|---|---|
static class | DeserializationExceptionHandler.DeserializationHandlerResponseEnumeration that describes the response from the exception handler. |
| Modifier and Type | Method and Description |
|---|---|
DeserializationExceptionHandler.DeserializationHandlerResponse | handle(ProcessorContext context, org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> record, Exception exception)Inspect a record and the exception received. |
DeserializationExceptionHandler.DeserializationHandlerResponse handle(ProcessorContext context, org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> record, Exception exception)
Note, that the passed in ProcessorContext only allows to access metadata like the task ID. However, it cannot be used to emit records via ProcessorContext.forward(Object, Object); calling forward() (and some other methods) would result in a runtime exception.
context - processor contextrecord - record that failed deserializationexception - the actual exception