gpt4 book ai didi

mongodb - 如何覆盖 MongoDB Source Connector 中的 Kafka Topic 配置?

转载 作者:行者123 更新时间:2023-12-02 16:10:43 25 4
gpt4 key购买 nike

我正在使用 MongoDB Source Connector 将数据从 MongoDB 集合获取到 Kafka。此连接器的作用是使用以下命名约定自动创建主题:

[prefix_provided_in_the_connector_properties].[db_name].[collection_name]

MongoDB Source Connector's documentation ,没有提及覆盖主题配置,例如分区数复制因子。我有以下问题:

  1. Is it possible to override the topic configs in the connector.properties file?
  2. If not, is it then done on Kafka's end? If so, can we individually configure each topics' settings or it will globally affect all the topics?

谢谢!

最佳答案

听起来您的经纪人有 auto.create.topics.enable=true 。建议禁用此功能并强制执行手动主题创建。

Connect 仅为其自身创建内部主题。源连接器理想应该提前创建其主题,否则,您将获得broker server.properties 中设置的默认值。更改值不会更改现有主题

关于mongodb - 如何覆盖 MongoDB Source Connector 中的 Kafka Topic 配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59798412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com