简体   繁体   English

Kafka连接接收器连接器与多个分区主题

[英]Kafka connect sink connector with multiple one partitioned topics

We would like to use the Kafka connect sink connector in order to copy messages from Kafka to Mongo DB.我们想使用 Kafka 连接接收器连接器来将消息从 Kafka 复制到 Mongo DB。 In our use case, we have multiple topics, with one partition each (the name of the topics can be regexed, for example, topic.XXX.name).在我们的用例中,我们有多个主题,每个主题都有一个分区(主题的名称可以是正则表达式,例如,topic.XXX.name)。 The number of these topics is increasing continuously.这些话题的数量不断增加。 I wonder if the Kafka connect architecture fits this use case.我想知道 Kafka 连接架构是否适合这个用例。 If so, how can it be configured the gain high scaleability and parallelism?如果是这样,如何配置获得高可扩展性和并行性? What will be the tasks.max? tasks.max 是什么? Number of workers?工人人数?

Kafka Connect is flexible; Kafka Connect 很灵活; the answer is as many as you need.答案是你需要的。

The number of running tasks per connect worker is mostly only limited by the JVM heap size of each worker.每个连接工作程序的运行任务数量大多仅受每个工作程序的 JVM 堆大小限制。 Adding more workers will allow you to have more total active connectors.添加更多工作人员将使您拥有更多的活动连接器。

For sink connectors, however, you can only have as many total tasks as total topic partitions being consumed.但是,对于接收器连接器,您只能拥有与消耗的主题分区总数一样多的总任务。

One thing to worry about, though, is frequent consumer group rebalancing as you add more and more topics.但是,要担心的一件事是,随着您添加越来越多的主题,消费者组会频繁重新平衡。 For this reason, it would be recommended to create independent connectors for any critical data因此,建议为任何关键数据创建独立的连接器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM