英文:
consolidate and migrate multiple kafka clusters to 1 cluster
问题
我有2个本地Kafka集群,分布在2个环境,开发和测试(它们具有相同的主题名称)。现在我想将它们合并成一个集群(AWS MSK)。我希望我的新Kafka集群具有两个环境的主题。它们的名称将通过前缀
英文:
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集群
- 运行MirrorSourceConnector的一个连接器,其属性为
默认的复制命名策略是添加别名。
默认分隔符是.
。如果您想要像您的示例中一样使用_
,请覆盖默认分隔符: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=_
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论