一 问题描述

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

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐