kafka mirrormaker 2从最新偏移而不是最早复制
我有一个与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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是解决问题,但发现了可能负责的此(当前打开)的问题: 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