简体   繁体   English

卡夫卡中针对不同主题的多个连接器将到达同一节点

[英]multiple connectors in kafka to different topics are going to same node

I have created two kafka connectors in kafka-connect which use the same Connector class but have different topics they listen to. 我在kafka-connect中创建了两个kafka连接器,它们使用相同的Connector类,但是它们听的主题不同。

When I launch the process on my node, both the connectors end up creating tasks on this process. 当我在节点上启动流程时,两个连接器最终都会在此流程上创建任务。 However, I would like one node to only handle one connector/topic. 但是,我希望一个节点仅处理一个连接器/主题。 How can I limit a topic/connector to a single node? 如何将主题/连接器限制为单个节点? I don't see any configuration in connect-distributed.properties where a process could specify which connector to use. 我在connect-distributed.properties中看不到任何配置,其中一个进程可以指定要使用的连接器。

Thanks 谢谢

Kafka Connect in distributed mode can run as a cluster of one or more workers . 分布式模式下的Kafka Connect可以作为一个或多个工作程序的集群运行。 Each worker can run multiple tasks . 每个工人可以执行多个任务 Depending on how many connectors and workers you are running, you will have tasks running on the same worker . 根据要运行的连接器工作线程数,您将在同一工作 线程上运行任务 This is deliberate - the idea is that Kafka Connect will manage your tasks and workload for you, across the available workers. 这是有意的-想法是Kafka Connect将在可用的工作人员中为您管理任务和工作量。

If you want to isolate your processing you can run Kafka Connect as separate Connect clusters, either on the same machine (make sure to use different REST ports), or separate machines. 如果要隔离处理,则可以将Kafka Connect作为单独的Connect群集运行,可以在同一台机器上(确保使用不同的REST端口),也可以在单独的机器上运行。

For more info, see architecture and config for steps to configure separate clusters. 有关更多信息,请参阅体系结构配置以获取配置单独群集的步骤。 Note that a cluster can actually be a single worker, but then you don't have any redundancy in the event of failure. 请注意,群集实际上可以是单个工作线程,但是如果发生故障,则没有任何冗余。

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

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