一 问题描述

The request included a message larger than the max message size the server will accept
2021-06-18 15:43:34.665 [pool-143-thread-1] ERROR c.a.o.canal.connector.kafka.producer.CanalKafkaProducer - java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.RecordTooLargeException: The request included a message larger than the max message size the server will accept.
java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.RecordTooLargeException: The request included a message larger than the max message size the server will accept.
......
Caused by: org.apache.kafka.common.errors.RecordTooLargeException: The request included a message larger than the max message size the server will accept.

二 解决办法

1.修改kafka参数配置,调大message.max.bytes值,示例:
message.max.bytes=426951500
重启kafka。

2.增大canal server值:
kafka.max.request.size = 426951500

如果还是不能同步,试下把kafka里的topic删除,会自动重建。

Logo

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

更多推荐