在卡夫卡消费群体的情况下,如何引入重新平衡的延迟? [英] How to introduce delay in rebalancing in case of kafka consumer group?

查看:72
本文介绍了在卡夫卡消费群体的情况下,如何引入重新平衡的延迟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想给我的使用者一些时间来重新启动,以便不会发生不必要的重新平衡.我怎样才能做到这一点?在关机的情况下,我希望复制出现,如果一段时间后不备份使用者,则应该进行重新平衡,否则就不会发生.

I want to give some time to my consumer to restart so that unnecessary rebalance doesnt happen. How can I do that? In case of shutdown, I want replication to come in picture and after some time if consumer is not back up, rebalance should occur else not.

推荐答案

您可以进行调整,称为 group.initial.rebalance.delay.ms 的代理级配置.

There's broker level config called group.initial.rebalance.delay.ms you can tweak.

小组协调员等待更多消费者的时间在执行第一次重新平衡之前加入一个新的组.更长的时间延迟意味着重新平衡的可能性可能会减少,但会增加直到处理开始.

The amount of time the group coordinator will wait for more consumers to join a new group before performing the first rebalance. A longer delay means potentially fewer rebalances, but increases the time until processing begins.

https://kafka.apache.org/documentation/

这篇关于在卡夫卡消费群体的情况下,如何引入重新平衡的延迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆