合并和迁移多个Kafka集群至一个集群。

huangapple go评论38阅读模式
英文:

consolidate and migrate multiple kafka clusters to 1 cluster

问题

我有2个本地Kafka集群,分布在2个环境,开发和测试(它们具有相同的主题名称)。现在我想将它们合并成一个集群(AWS MSK)。我希望我的新Kafka集群具有两个环境的主题。它们的名称将通过前缀来区分。例如:dev_topicA,test_topicA。这是否可行?

英文:

I have 2 onprem kafka clusters on 2 environment dev and test (they have the same topic names). Now I want to consolidate them into only one cluster (aws msk). I would like my new kafka cluster to have both environment topics. They will be differentiated by the prefix <env> in their names. Example: dev_topicA, test_topicA. Is that posible?

答案1

得分: 1

以下是您要翻译的内容:

  • 使用MirrorMaker2可以实现以下功能:
    • 运行MirrorSourceConnector的一个连接器,其属性为source.cluster.alias=dev,源集群引导服务器指向开发集群
    • 运行另一个MirrorSourceConnector的连接器,其属性为source.cluster.alias=test,源集群引导服务器指向测试集群
    • 在这两个连接器中,使用目标集群引导服务器作为您的MSK集群

默认的复制命名策略是添加别名。

默认分隔符是.。如果您想要像您的示例中一样使用_,请覆盖默认分隔符:replication.policy.separator=_

英文:

It is possible with MirrorMaker2:

  • run a connector of MirrorSourceConnector with properties source.cluster.alias=dev and source cluster bootstrap servers to dev cluster
  • run another connector of MirrorSourceConnector with properties source.cluster.alias=test and source cluster bootstrap servers to test clusters
  • in both connectors use target cluster bootstrap as your MSK cluster

The default replication naming policy is the one to add aliases.

Default separator is .. If you would like to have _ like in your example, override default separator: replication.policy.separator=_

huangapple
  • 本文由 发表于 2023年2月6日 15:06:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/75358274.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定