栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

whose size is larger than the fetch size

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

whose size is larger than the fetch size

1  整体异常描述
org.apache.kafka.common.errors.RecordTooLargeException: There are some messages at [Partition=Offset]: {ME1000002013-8=4791187} whose size is larger than the fetch size 1048576 and hence cannot be returned. Please considering upgrading your broker to 0.10.1.0 or newer to avoid this issue. Alternately, increase the fetch size on the client (using max.partition.fetch.bytes)

  

 2  背景        

   1)  消息队列使用的是Kafka

   2)  客户端消费者使用spring boot方式进行的集成

 3  原因分析

    1048576字节=1MB,消费者在消费Kafka消息的时候,默认会进行单条消息大小的控制,默认

值就是1MB。

 4  解决方案

   spring boot  配置文件加入配置,设置拉取消息的最大值即可

 

spring:
  kafka:
    consumer:
      properties:
        max.partition.fetch.bytes: 104857600

  

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/591872.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号