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

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

问题描述

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

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/

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

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