kafka resource_error ai_generated true

org.apache.kafka.common.errors.GroupMaxSizeReachedException:消费者组已达到最大大小限制

org.apache.kafka.common.errors.GroupMaxSizeReachedException: The consumer group has reached its maximum size

ID: kafka/group-max-size-exceeded

其他格式: JSON · Markdown 中文 · English
88%修复率
85%置信度
1证据数
2024-03-15首次发现

版本兼容性

版本状态引入弃用备注
3.5.0 active
3.6.0 active
3.7.0 active

根因分析

消费者组的成员数超过了 group.max.size 配置的最大限制。

English

The consumer group has exceeded the maximum number of members configured by group.max.size.

generic

官方文档

https://kafka.apache.org/documentation/#brokerconfigs_group.max.size

解决方案

  1. Increase group.max.size on the broker via kafka-configs.sh:
    kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --alter --add-config group.max.size=20
  2. Reduce the number of consumer instances in the group by consolidating partitions to fewer consumers.

无效尝试

常见但无效的做法:

  1. 95% 失败

    Restarting consumers individually does not resolve the underlying configuration limit.

  2. 90% 失败

    Deleting offsets only resets consumption progress, not the group membership count.