-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't recover from structured CloudEvents with invalid JSON #2492
Comments
It should be considered as a deserialization failure. So definitely a bug. Could you provide an example of such broken cloud events? |
Any invalid JSON will do:
|
An option is to use the We may imagine a way to invoke the |
Using JsonObjectDeserializer would make it impossible to handle binary messages on the same topic. Just to be clear, I don't need a work around, I got it working by using the CloudEvents SDK deserializer. One side effect in Quarkus, is that it also triggers the liveness and readiness checks to fail, effectively causing a denial of service. |
It still needs to be fixed in reactive messaging. The SDK is not very Quarkus friendly (native issues, detection, reflection...). It works, but may lead to issues. |
When receiving a structured CloudEvent, the payload is converted to JSON by KafkaCloudEventHelper#createFromStructuredCloudEvent. If the actual data is not valid JSON, this throws an exception which is handled in KafkaSource by immediately closing the connection.
Both the
value-deserialization-failure-handler
andfailure-strategy
are never invoked, and since this is before any application code, it seems impossible to handle this failure case.The text was updated successfully, but these errors were encountered: