kafka mirrormaker 2从最新偏移而不是最早复制

发布于 2025-02-07 02:26:03 字数 1132 浏览 2 评论 0原文

我有一个与Mirrormaker 2的群集A到群集B的主题复制的问题。我想从最新偏移量中复制这些主题,而不是从一开始就复制它们。但是,当我设置auto.offset.reset =最新什么都没有发生,并且从主题的开头而不是结束时,复制仍然发生。我把它设置错误了吗?

这是我的整个MM2配置:

clusters = A, B

A.bootstrap.servers = broker-01A:9092
B.bootstrap.servers = broker-01B:9092,broker-02B:9092,broker-03B:9092

replication.policy.class = org.apache.kafka.connect.mirror.IdentityReplicationPolicy

#Enable replication between clusters and define topics which should be replicated
A->B.enabled = true
A->B.topics = .*
A->B.replication.factor=3
A->B.emit.heartbeats.enabled = true
A->B.emit.checkpoints.enabled = true

auto.offset.reset=latest
refresh.topics.enabled=true

heartbeats.topic.replication.factor=1
checkpoints.topic.replication.factor=1
offset-syncs.topic.replication.factor=1

config.storage.replication.factor = 1
offset.storage.replication.factor = 1
status.storage.replication.factor = 1

Update

更改auto.offset.Reset =最新 a.consumer.auto.offset.reset.reset.reset =最新 auto.offset.reset =最新配置开始出现在MirrorMaker日志中。但仍然没有运气。仍然从一开始就完成镜像。

I have a problem with replication of topics from cluster A to cluster B with Mirrormaker 2. I want to replicate these topics from latest offset instead of replicating them from the beginning. But when I set auto.offset.reset=latest nothing happens and replication still happens from the beginning of topics instead of an end. Do I set it wrong?

This is my whole MM2 configuration:

clusters = A, B

A.bootstrap.servers = broker-01A:9092
B.bootstrap.servers = broker-01B:9092,broker-02B:9092,broker-03B:9092

replication.policy.class = org.apache.kafka.connect.mirror.IdentityReplicationPolicy

#Enable replication between clusters and define topics which should be replicated
A->B.enabled = true
A->B.topics = .*
A->B.replication.factor=3
A->B.emit.heartbeats.enabled = true
A->B.emit.checkpoints.enabled = true

auto.offset.reset=latest
refresh.topics.enabled=true

heartbeats.topic.replication.factor=1
checkpoints.topic.replication.factor=1
offset-syncs.topic.replication.factor=1

config.storage.replication.factor = 1
offset.storage.replication.factor = 1
status.storage.replication.factor = 1

UPDATE

After changing the auto.offset.reset=latest to A.consumer.auto.offset.reset=latest the auto.offset.reset=latest configuration started to appear in Mirrormaker logs. But still no luck. Still mirroring is done from the start.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剧终人散尽 2025-02-14 02:26:03

这不是解决问题,但发现了可能负责的此(当前打开)的问题: https:https:///// essess.apache.org/jira/browse/kafka-13988

Not a fix but found this (currently open) issue that might be responsible: https://issues.apache.org/jira/browse/KAFKA-13988

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文