已解决 canal同步kafka提示The request included a message larger than the max message size the server will accept.
-
canal动态添加主题,报错如下:
Caused by: org.apache.kafka.common.errors.RecordTooLargeException: The request included a message larger than the max message size the server will accept. 2021-02-23 16:19:46.899 [pool-32-thread-5] ERROR com.alibaba.otter.canal.kafka.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.
-
这个报错是你消息体过大了,可以尝试下如下的方式:
- 修改 canal/conf/canal.properties配置,调整更大的值
canal.mq.maxRequestSize = 10485760
- 修改kafka/config/producer.properties ,调整更大的值
max.request.size=12695150
- 修改kafka/config/server.properties ,调整更大的值
message.max.bytes=12695150
- 重启服务
Copyright © 2020 ClouGence, Inc.备案号:浙ICP备20007605号-2