[ https://issues.apache.org/jira/browse/KAFKA-19430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18013460#comment-18013460 ]
Uladzislau Blok commented on KAFKA-19430: ----------------------------------------- [~mjsax] Hey Matthias. Sorry for the delay. I took a look into issue. Problem here is that exception is threw by Kafka client not streams, so it's even before we're trying to de-serialize the message. I don't think it's good to handle it inside 'DeserializationExceptionHandler' because it's not about de-serialization, is it? In streams error package there is a 'ProductionExceptionHandler', I think we can have something similar for reading from kafka with for example three types of handling: CONTINUE(0, "CONTINUE"), FAIL(1, "FAIL"), RETRY(2, "RETRY"); // only for RetriableException So it's generally the same how it looks for ProductionExceptionHandler. Btw may be we even could unify that, and have one KafkaReadWriteExceptionHandler (I'm bad at naming sorry) which will handle both producer/consumer errors. What do you think? > Don't fail on RecordCorruptedException > -------------------------------------- > > Key: KAFKA-19430 > URL: https://issues.apache.org/jira/browse/KAFKA-19430 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: Matthias J. Sax > Assignee: Uladzislau Blok > Priority: Major > > From [https://github.com/confluentinc/kafka-streams-examples/issues/524] > Currently, the existing `DeserializationExceptionHandler` is applied when > de-serializing the record key/value byte[] inside Kafka Streams. This implies > that a `RecordCorruptedException` is not handled. > We should explore to not let Kafka Streams crash, but maybe retry this error > automatically (as `RecordCorruptedException extends RetriableException`), and > find a way to pump the error into the existing exception handler. > If the error is transient, user can still use `REPLACE_THREAD` in the > uncaught exception handler, but this is a rather heavy weight approach. -- This message was sent by Atlassian Jira (v8.20.10#820010)