栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

kafka max.request.size过小的问题

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

kafka max.request.size过小的问题

遇到问题:
配置maxwell+kafka的时候遇到报错提示producer request的大小大于默认值,结合maxwell启动时候的打印初始参数可知是参数的问题

ERROR MaxwellKafkaProducer - The message is 1260501 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration.

参考kafka文档可知max.request.size默认值为1048576
解决办法:
1.

https://ask.csdn.net/questions/672334
看文章了解到可以修改kafka的server.properties、producer.properties、kafka-rest.properties这三个文件中的max.request.size参数。

max.request.size=104857600  #大小是自己的情况而定

我只修改了前两个文件中的参数(没找到kafka-rest.properties),但是依旧不生效
2.

https://www.yisu.com/zixun/55015.html

收到文章的启发,我猜测应该要修改的不(仅)是kafka的配置文件,还有maxwell的 config.properties。因为我是用的是docker部署的maxwell,镜像中只有 config.properties.examle,怎么修改都是没用的。必须自己新建一个文件 config.properties,并在其中加入

max.request.size = 104857600

然后启动的时候通过config参数指定这个配置文件

bin/maxwell --user='maxwell'     
--password='123456' --host='xxx.xx.x.x' --producer=kafka     
--kafka.bootstrap.servers=xxx.xx.x.x:9092 
--kafka_topic=maxwell --config config.properties

即可

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

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

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