更改死信主题默认保留时间
我们已启用了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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用所需的属性提前创建您的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