项目使用spring-kafka操作消费kafka
近期出现消费速度变慢,consumer消费一条数据平均需要200ms的时间,并且频繁发生,consumer会停止消费十几秒。
以下为日志记录,consumer会时长从消费组中掉出再重新加入
o.a.k.c.c.i.AbstractCoordinator:542 - Marking the coordinator 127.0.0.1:9092 (id: 2147483643 rack: null) dead for group group.id
o.a.k.c.c.i.AbstractCoordinator:505 - Discovered coordinator 127.0.0.1:9092 (id: 2147483643 rack: null) for group group.id.
o.a.k.c.c.i.ConsumerCoordinator:292 - Revoking previously assigned partitions [topic-12] for group group.id
o.a.k.c.c.i.AbstractCoordinator:326 - (Re-)joining group group.id
o.a.k.c.c.i.AbstractCoordinator$SyncGroupResponseHandler:434 - Successfully joined group group.id with generation 12182
o.a.k.c.c.i.ConsumerCoordinator:231 - Setting newly assigned partitions [topic-12] for group group.id
kafka服务配置文件server.properties提高系统配置参数
#Broker处理消息的最大线程数
num.network.threads=cpu核数加1
#Broker处理磁盘IO的线程数
num.io.threads=cpu核数2倍,最大不超过3倍
备份并重启kafka服务
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。