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

即可

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值