Jean-Benoit Hamard
11/27/2024, 12:30 PMproperties to the underlying kafka client used by the connector, but apparently setting
properties.errors.deadletter.topic.name and properties.errors.tolerance (see here) on the connector options in the definition of the source table does not take effet. Has anyone managed to achieve this ? Is there another way to send failed messages to a DLQ topic in a flink SQL using kafka as a source ? Thx !Thomas Cooper
11/27/2024, 1:54 PMThomas Cooper
11/27/2024, 1:54 PMThomas Cooper
11/27/2024, 1:55 PMJean-Benoit Hamard
11/27/2024, 2:17 PMproperties as I explain above, but this does not take effect.
I've had a quick look at the connector code and I think i know why : the deserialization does not seem to be delegated to the wrapped kafka consumer (so the properties are not used) => the exception is raised from flink connector (for state management and fine offset commits I imagine).
But generally speaking, when the execution of such table API expression fails on a message, how can I catch this exception ? Is it possible to skip such message ?
I found this thread/PR but not sure how that can be used in a Table API env (digging into this now).
Does that make more sense now @Thomas Cooper? Do you know about good strategies to handle kafka source errors in a Table API env ?
Thx a lot again ! I'll report here if I find new things on that πThomas Cooper
11/27/2024, 4:40 PMI'm a bit confused though π This doc I refer to is the source kafka connector, right ? And it points to the underlying kafka consumer options (which makes sense to me).It is quite confusing. The Flink Kafka Connector does use a Kafka Client under the hood. However, it does not use the Kafka Connect Sink Connector API which is where the DLQ option comes from. That, AFAIK, is why setting the DLQ option for the Flink connector has no effect.
Thomas Cooper
11/27/2024, 4:42 PMThomas Cooper
11/27/2024, 4:42 PMJean-Benoit Hamard
11/27/2024, 4:46 PMThomas Cooper
11/27/2024, 4:47 PMFAS
11/27/2024, 6:49 PM'value.json.ignore-parse-errors' = 'true' that keeps the pipe going but have to work extra to identify and correct these bad records and move into DLQ
Someone tried to address the same for avro message here
https://github.com/apache/flink/pull/14444/filesJean-Benoit Hamard
11/28/2024, 7:32 AM