Kafka消费者赢了,开始消耗,当前偏移值是空的

发布于 2025-02-09 23:48:00 字数 414 浏览 2 评论 0原文

我们在卡夫卡(Kafka)有一个工作的主题消费者设置。在尝试在另一个环境中创建相同的过程时,消费者不会开始从主题中阅读。我尝试重新启动,删除,重命名和许多事情,但它们都没有起作用。

当我用命令kafka-consumer-groups-deScribe描述消费者组时,我得到了以下结果:

GROUP           TOPIC           PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG          
G__BRC_SENDSMS  BRC_SENDSMS     0          -               31              - 

请注意,当前偏移量不是零。由于它不是零,因此也没有滞后。这是正常的吗?我应该怎么办?

We have a working topic-consumer setup in kafka. While trying to create the same in another environment, the consumer does not start reading from the topic. I've tried restarting, deleting, renaming and many things but none of them worked.

When I describe the consumer group with the command kafka-consumer-groups --describe I got this result:

GROUP           TOPIC           PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG          
G__BRC_SENDSMS  BRC_SENDSMS     0          -               31              - 

Mind how current offset is not zero. Since it is not zero, there is also no lag too. Is this normal? What should I do?

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

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

发布评论

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

评论(1

開玄 2025-02-16 23:48:00

在另一个环境中创建相同的

可以从brc_sendsms,分区 0 读取。同时。更改组ID,应该开始读取数据。或在主题中添加更多分区,您应该在所有消费者实例之间看到小组重新平衡并分发消息。如果不起作用,请检查此“其他环境”中的网络配置,例如kafka advertied.listeners

如果没有当前的偏移,那么您的消费者实际上是否承诺?

create the same in another environment

Only one consumer in group.id=G__BRC_SENDSMS can read from BRC_SENDSMS, partition 0 at the same time. Change the group id, and it should start to read data. Or add more partitions to the topic, and you should see the group rebalance and distribute messages between all consumer instances. If neither work, then check networking configurations in this "other environment", such as the Kafka advertised.listeners.

If there is no current offset, then has your consumer actually committed yet?

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