Kafka Streams - 连接到多个集群 [英] Kafka Streams - connecting to multiple clusters

查看:734
本文介绍了Kafka Streams - 连接到多个集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Kafka Streams开发人员指南中说:


Kafka Streams应用程序只能与此配置值指定的单个Kafka群集
进行通信。未来版本的Kafka Streams将支持
连接到不同的Kafka集群以读取输入流和
写入输出流。

Kafka Streams applications can only communicate with a single Kafka cluster specified by this config value. Future versions of Kafka Streams will support connecting to different Kafka clusters for reading input streams and writing output streams.

这是否意味着我的整个应用程序只能连接到单个Kafka群集或每个 KafkaStreams 只能连接到一个集群?

Does this mean that my whole application can only connect to a single Kafka Cluster or each instance of KafkaStreams can only connect to a single cluster?

我可以创建多个具有连接到不同群集的不同属性的KafkaStreams实例吗?

Could I create multiple KafkaStreams instances with different properties that connect to different clusters?

谢谢

推荐答案

这意味着单个应用程序只能连接到一个集群。

It means that a single application can only connect to one cluster.


  • 您无法从群集A中读取主题并将计算结果写入群集B.

  • 无法从两个不同的群集中读取两个主题实例。


我可以创建多个具有连接到不同集群的不同属性的KafkaStreams实例吗?

Could I create multiple KafkaStreams instances with different properties that connect to different clusters?

是的,绝对的。但那些不同的实例将是不同的应用程序。 (想想消费者群体。)

Yes, absolutely. But those different instances will be different applications. (Think "consumer groups".)

更新:

单一内JVM,您可以根据需要创建任意数量的 KafkaStreams 实例。您还可以将它们配置为连接到不同的群集(如果要进行相同的处理,可以对所有群集使用相同的 KStreamBuilder )。

Within a single JVM, you can create as many KafkaStreams instances as you like. You can also configure them to connect to different clusters (and you can use the same KStreamBuilder for all of them if you want to do the same processing).

这篇关于Kafka Streams - 连接到多个集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆