在使用 canal 和kafka处理数据同步时canal日志提示如下异常:
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
原因是消息过大无法处理
第一步:修改 canal/conf/canal.properties配置(我在原有基础上加了一个0,可能需要更合适的数量级)
canal.mq.maxRequestSize = 10485760
第二步:修改kafka/config/producer.properties
max.request.size=12695150
修改kafka/config/server.properties
message.max.bytes=12695150
第三步:重启服务