根据源码可能有两种情况
一种是因为rebalance导致分区订阅发生变化,属于提交的分区与订阅的分区不一致
Offset commit cannot be completed since the consumer is undergoing a rebalance for auto partition assignment. You can try completing the rebalance by calling poll() and then retry the operation.
导致这种现象的情况可能有心跳失败、会话失效
二种是因为超过最大拉取时间引起了第二次重新拉取,第一次拉取的数据进行处理消费手动提交offset就会失败
Offset commit cannot be completed since the consumer is not part of an active group for auto partition assignment; it is likely that the consumer was kicked out of the group.