iceberg icon indicating copy to clipboard operation
iceberg copied to clipboard

Question Regarding DLQ Handling and Documentation

Open peach12345 opened this issue 1 year ago • 6 comments

Query engine

None

Question

Hi everyone, We are encountering the same issue described in Issue #10840 and would like to understand more about when exactly a message gets placed on a Dead Letter Queue (DLQ). Is there a well-documented explanation of this process?

It seems like the DLQ functionality is still in its early stages and may not be ready for production use. However, we might be mistaken, and the adapter could already be production-ready—but we haven't found clear documentation on this. Given the importance of DLQ handling, we would appreciate further improvements in this area.

Looking forward to any insights you can provide.

peach12345 avatar Apr 10 '25 05:04 peach12345

Hi @peach12345 as far as I am aware Kafka Connect Iceberg does not has DLQ support for sending the records to DLQ once the record lands to the sink task but you can have the Kafka Converter layer DLQ support which checks for the convertibility between the ConsumerRecord and ConnectRecord and in case of incompatibilities (which is upto the converter configured to use) push the records to DLQ topic based on the error tolerance level and DLQ configured.

kumarpritam863 avatar Apr 13 '25 08:04 kumarpritam863

Hi @kumarpritam863 thank you for your response. Regarding error handling within the Iceberg-Sink Connector, how does it work? We recently encountered an issue where metadata was successfully written, but the corresponding Parquet file was not. As a result, the metadata pointed to a Parquet file that did not actually exist.

However, since we are currently in the development and testing phase, it is possible that we may have cleared a topic too early or made a similar mistake.

peach12345 avatar Apr 14 '25 05:04 peach12345

Hi @peach12345 as far as I am aware Kafka Connect Iceberg does not has DLQ support for sending the records to DLQ once the record lands to the sink task but you can have the Kafka Converter layer DLQ support which checks for the convertibility between the ConsumerRecord and ConnectRecord and in case of incompatibilities (which is upto the converter configured to use) push the records to DLQ topic based on the error tolerance level and DLQ configured.

Hi @kumarpritam863 is adding a DLQ for the sink task something on the roadmap?

From this chart it looks like DLQ support is available for de/serialization errors. However, we'd like to handle errors such as a record that causes a table write to fail because the record has an incompatible schema with the table.

EDIT: It looks like in the original databricks/tabular repo, there is an open PR to provide DLQ support when sinking records https://github.com/databricks/iceberg-kafka-connect/pull/233. Are there plans to pick up that PR here?

aaronphilip avatar Apr 14 '25 12:04 aaronphilip

I'll go beyond just schema compliance issues. I use dynamic routing based on a field in the record:

    "iceberg.tables.dynamic-enabled": "true",
    "iceberg.tables.route-field": "last_seen",
    "iceberg.tables.auto-create-enabled": "true",
    "iceberg.tables.route-format": "database.table",

I hit a problem when using Glue as the catalog. What if last_seen has an invalid character in it? It's perfectly legal in JSON parlance, but not legal in Iceberg / Glue. We need DLQ support!

jesumyip avatar May 14 '25 01:05 jesumyip

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

github-actions[bot] avatar Nov 11 '25 00:11 github-actions[bot]

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'

github-actions[bot] avatar Nov 26 '25 00:11 github-actions[bot]