更改死信主题默认保留时间

发布于 2025-02-08 06:00:26 字数 845 浏览 2 评论 0原文

我们已启用了JDBC接收器连接器的死字队列。默认保留政策为7天,但对于DLQ,我们希望将其减少为1天。以下是我们的水槽连接器中DLQ的属性。

   'errors.tolerance'='all',
   'errors.deadletterqueue.topic.name' = 'error_topic',
   'errors.deadletterqueue.topic.replication.factor'= -1,
   'errors.log.include.messages' = true,
   'errors.log.enable' = true,
   'errors.deadletterqueue.context.headers.enable' = true

是否有可以更改保留时间的属性?我们尝试使用以下属性,但没有按预期工作。

'topic.creation.default.retention.ms'='3000',
'admin.topic.creation.default.retention.ms'='3000',
'admin.retention.ms' = '3000',
'admin.topic.retention.ms' = '3000',
'admin.topic.creation.retention.ms' = '3000',
'error.topic.creation.default.retention.ms'='3000',
'error.deadletterqueue.topic.creation.default.retention.ms'='3000',
'admin.topic.creation.default.retention.ms' = 3000,

We have enabled dead letter queue for our JDBC sink connectors. Out default retention policy is 7 days but for DLQ we want to reduce it to 1 day. Following are the properties for DLQ in our Sink connector.

   'errors.tolerance'='all',
   'errors.deadletterqueue.topic.name' = 'error_topic',
   'errors.deadletterqueue.topic.replication.factor'= -1,
   'errors.log.include.messages' = true,
   'errors.log.enable' = true,
   'errors.deadletterqueue.context.headers.enable' = true

Is there a property using which we can change the retention time? We have tried using following properties but did not work as expected.

'topic.creation.default.retention.ms'='3000',
'admin.topic.creation.default.retention.ms'='3000',
'admin.retention.ms' = '3000',
'admin.topic.retention.ms' = '3000',
'admin.topic.creation.retention.ms' = '3000',
'error.topic.creation.default.retention.ms'='3000',
'error.deadletterqueue.topic.creation.default.retention.ms'='3000',
'admin.topic.creation.default.retention.ms' = 3000,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城旧梦 2025-02-15 06:00:26

使用所需的属性提前创建您的DLQ主题。否则,您需要使用kafka-topics -Alter命令,因为修改连接中的任何配置仅适用于全新主题,如果您的主题配置可以在分区之外进行,并且可以设置复制

Create your DLQ topics ahead of time with the properties you'll need. Otherwise, you'll need to use kafka-topics --alter command since modifying any configs in Connect would only apply to brand new topics, if you the topic configs outside of partitions and replication could be set

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文