[
https://issues.apache.org/jira/browse/KAFKA-17994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ilya updated KAFKA-17994:
-------------------------
Description:
When we got a PR to upgrade kafka clients 3.8.1 -> 3.9.0, we saw some failing
tests. They were relating to using a DeserializationExceptionHandler with 'log
and continue' strategy, however on newest version the stream was just crashing
when Jackson was trying to deserialize a faulty json and this handler was not
invoked.
In this
[KIP-1033|https://cwiki.apache.org/confluence/display/KAFKA/KIP-1033%3A+Add+Kafka+Streams+exception+handler+for+exceptions+occurring+during+processing],
specifically in this PR
[https://github.com/apache/kafka/pull/16745/files#diff-77791b213bb41d1df63a23860f1faf4394dfbd7d6c4ed9cd021950d82c31c24f]
a change was introduced to catch only RuntimeException type and handle them in
the handler. However, all the Jackson exceptions inherit Exception type, not
RuntimeException -
https://fasterxml.github.io/jackson-core/javadoc/2.14/com/fasterxml/jackson/core/JacksonException.html
So with this change all the Jackson exceptions (or any checked exceptions)
would not be passed to the DeserializationExceptionHandler like it was before.
was:
When we got a PR to upgrade kafka clients 3.8.1 -> 3.9.0, we saw some failing
tests. They were relating to using a DeserializationExceptionHandler with 'log
and continue' strategy, however on newest version the stream was just crashing
when Jackson was trying to deserialize a faulty json and this handler was not
invoked.
In this
[KIP-1033|https://cwiki.apache.org/confluence/display/KAFKA/KIP-1033%3A+Add+Kafka+Streams+exception+handler+for+exceptions+occurring+during+processing],
specifically in this PR
[https://github.com/apache/kafka/pull/16745/files#diff-77791b213bb41d1df63a23860f1faf4394dfbd7d6c4ed9cd021950d82c31c24f]
a change was introduced to catch only RuntimeException type and handle them in
the handler. However, all the Jackson exceptions inherit Exception type, not
RuntimeException.
So with this change all the Jackson exceptions (or any checked exceptions)
would not be passed to the DeserializationExceptionHandler like it was before.
> Runtime exceptions are not handled when deserializing kafka stream record
> -------------------------------------------------------------------------
>
> Key: KAFKA-17994
> URL: https://issues.apache.org/jira/browse/KAFKA-17994
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 3.9.0
> Reporter: Ilya
> Priority: Major
>
> When we got a PR to upgrade kafka clients 3.8.1 -> 3.9.0, we saw some failing
> tests. They were relating to using a DeserializationExceptionHandler with
> 'log and continue' strategy, however on newest version the stream was just
> crashing when Jackson was trying to deserialize a faulty json and this
> handler was not invoked.
> In this
> [KIP-1033|https://cwiki.apache.org/confluence/display/KAFKA/KIP-1033%3A+Add+Kafka+Streams+exception+handler+for+exceptions+occurring+during+processing],
> specifically in this PR
> [https://github.com/apache/kafka/pull/16745/files#diff-77791b213bb41d1df63a23860f1faf4394dfbd7d6c4ed9cd021950d82c31c24f]
> a change was introduced to catch only RuntimeException type and handle them
> in the handler. However, all the Jackson exceptions inherit Exception type,
> not RuntimeException -
> https://fasterxml.github.io/jackson-core/javadoc/2.14/com/fasterxml/jackson/core/JacksonException.html
> So with this change all the Jackson exceptions (or any checked exceptions)
> would not be passed to the DeserializationExceptionHandler like it was before.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)