项目场景:

使用maxwell通过kafka发布mysql binlog数据


问题描述:

在启动maxwell的时候遇到这个warning,结合maxwell启动时候的打印初始参数可知是参数出了问题

The request included a message larger than
 the max message size the server will accept

原因分析:

参考

https://blog.csdn.net/tiyager/article/details/102620645
https://www.pianshen.com/article/47792055511/

可知生产者发送的消息过大,大于broker的配置


解决方案:

应该设置message.max.bytes=2147483640,位置在kafka的配置文件server.properties中,且要求max.request.size必须小于message.max.bytes以及消费者的max.partition.fetch.bytes

关于max.request.size可以参考我的上一篇文章

https://blog.csdn.net/qq_28668779/article/details/120843429

保险起见我还同时修改了maxwell的config.properties

echo 'message.max.bytes=2147483640' >> config.properties

即可

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐