What about (106) to unify both exiting callback methods of
`ProductionExceptionHandler` into a single one, instead of adding two
new ones?
Damien's last reply about it was:
I will think about unifying, I do agree it would be cleaner.
There was not follow up on this question, and the KIP right now still
proposes to add two new methods, which I believe we could (should?)
unify to:
default ProductionExceptionHandlerResponse handle(final ErrorHandlerContext context,
final ProducerRecord<?, ?> record,
final Exception exception) {
Ie, we drop the generics `<byte[], byte[]>` on `ProducerRecord` what
allows you to also pass in a non-serialized ProducerRecord of any type
for the serialization error case.
Btw: wondering if we also want to pass in a flag/enum about key vs value
serialization error similar to what was proposed in KIP-1036? The only
"oddity" would be, that we call the handler other error cases, too, not
just for serialization exceptions. But we wculd tackle this by
introducing a new class `RecordSerializationException` which would
include the flag and would ensure that KS hands this exception into the
handler. This would keep the handler interface/method itself clean.
-Matthias
On 5/3/24 2:15 AM, Loic Greffier wrote:
Hi Bruno,
Good catch, KIP has been updated accordingly.
Regards,
Loïc