Kafka commit:Offset commit with offsets failed

服务消费Kafka数据时遇到offset commit失败的问题,主要原因是Kafka配置问题和业务逻辑漏洞。1.1 配置问题表现为批量消息过大,consumer在session.timeout.ms内无法消费完成,解决方法包括调整session.timeout.ms和max.poll.records。1.2 业务逻辑问题如数据库查询效率低下或HTTP请求超时导致数据积压。总结解决步骤包括通过console-consumer检查、对比其他topic消费情况和谨慎清理Kafka日志。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一个服务消费 kafka 数据出现如下错误:
错误日志: 2022-04-24 17:20:49.168 [org.springframework.kafka.KafkaListenerEndpointContainer#35-0-C-1] ERROR org.apache.kafka.clients.consumer.internals.ConsumerCoordinator[296] - [Consumer clientId=consumer-101, groupId=jsis-update-up-dev] Offset commit with offsets {parkPassagegateInfoUp-0=OffsetAndMetadata{offset=2323, metadata=''}} failed org.apache.kafka.clients.consumer.CommitFailedException: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. This means that the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time message processing. You can address this either by increasing the session timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.

1、原因分析

1.1 kakfa 配置问题,承载大数据上传受压

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值