Open lm-sec opened 9 months ago
The modification to JsonSerializer.cs
does not work.
The issue is in JobSerializer.cs
. We now catch the exception, a JsonException
, and soft fail. Better logging would / retry and stuff like that would be better, but it is no longer a bug in my branch.
The error here is triggered by a custom job parameter being an array instead of a string. It would break the deserialization process, but not drop the message. Therefore, it would crash again right away when it retried to read the message, creating an infinite loop of crashing.
Here is the error message:
A potential solution could be to catch the exception and ignore it to just ignore the message. I don't know if it works.
https://jonboulineau.me/blog/kafka/dealing-with-bad-records-in-kafka
Here is a draft of a potential implementation in
JsonSerializer.cs
:Again, I don't know that it would work.