LogMetricAndContinueExceptionHandler¶
LogMetricAndContinueExceptionHandler
is a DeserializationExceptionHandler
(Kafka Streams).
Configuring¶
void configure(
Map<String, ?> configs)
configure
is part of the DeserializationExceptionHandler
(Kafka Streams) abstraction.
configure
finds a StreamsErrorCollector (using ksql.internal.streams.error.collector key in the given configs
).
Handling Deserialization Error¶
DeserializationHandlerResponse handle(
ProcessorContext context,
ConsumerRecord<byte[], byte[]> record,
Exception exception)
handle
is part of the DeserializationExceptionHandler
(Kafka Streams) abstraction.
handle
prints out the following DEBUG message to the logs:
Exception caught during Deserialization, taskId: [taskId], topic: [topic], partition: [partition], offset: [offset]
handle
requests the StreamsErrorCollector to recordError for the topic.
handle
returns CONTINUE
.
Logging¶
Enable ALL
logging level for io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler
logger to see what happens inside.
Add the following line to conf/log4j.properties
:
log4j.logger.io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler=ALL
Refer to Logging.