本文解析了kafka消费者在启动时遇到'Attempt to heartbeat failed since group is rebalancing'的问题,该问题源于消费者组的心跳机制。当有新消费者加入或心跳检测超过max.poll.interval.ms时,会触发rebalance,导致此错误。解决方案包括调整max.poll.interval.ms或max.poll.records参数。
摘要由CSDN通过智能技术生成
解读
生产对接,启动消费端出现Attempt to heartbeat failed since group is rebalancing,它是kafka消费者组的心跳机制,用于检测超时不能工作的消费者。 当有新的消费者加入的时候,kafka消费者组启动rebalance机制,即重平衡,重新分配资源。同时检测组内消费者成员是否可以正常工作。如果心跳检测失败,则会报Attempt to heartbeat failed since group is rebalancing
2021-07-2115:58:58.574 INFO 18804---[ronmental-group]
kafka消费端Attempt to heartbeat failed since group is rebalancing
一、日志打印生产对接,启动消费端出现Attempt to heartbeat failed since group is rebalancing,它是kafka消费者组的心跳机制,用于检测超时不能工作的消费这。当有新的消费者加入的时候,kafka消费者组启动rebalance机制,即重平衡,重新分配资源。同时检测组内消费者成员是否可以正常工作。如果心跳检测失败,则会报Attempt to heartbeat failed since group is rebalancing2021-07-21 15: