开发者社区> 问答> 正文

binlog消息过大无法正常发送到kafka的broker端时,canal 服务CPU打满并不停重试

问题如题,因为broker端显示kafka大小为1MB,所以碰到大消息时就没办法了。

错误日志如下,会不停打印 2021-05-16 23:13:18.046 [pool-6-thread-1] ERROR com.alibaba.otter.canal.kafka.CanalKafkaProducer - java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.RecordTooLargeException: The message is 1721497 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration. java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.RecordTooLargeException: The message is 1721497 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration. at com.alibaba.otter.canal.kafka.CanalKafkaProducer.produce(CanalKafkaProducer.java:224) ~[canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:188) ~[canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:129) ~[canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:186) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:23) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:228) [canal.server-1.1.4.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.RecordTooLargeException: The message is 1721497 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration. at org.apache.kafka.clients.producer.KafkaProducer$FutureFailure.(KafkaProducer.java:1108) ~[kafka-clients-0.11.0.2.jar:na] at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:808) ~[kafka-clients-0.11.0.2.jar:na] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:745) ~[kafka-clients-0.11.0.2.jar:na] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:634) ~[kafka-clients-0.11.0.2.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.produce(CanalKafkaProducer.java:208) ~[canal.server-1.1.4.jar:na] ... 8 common frames omitted Caused by: org.apache.kafka.common.errors.RecordTooLargeException: The message is 1721497 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration

原提问者GitHub用户stan9333

展开
收起
山海行 2023-04-27 16:55:49 265 0
1 条回答
写回答
取消 提交回答
  • 可以配置过滤下无用的大字段

    原回答者GitHub用户agapple

    2023-04-28 12:32:52
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Java Spring Boot开发实战系列课程【第16讲】:Spring Boot 2.0 实战Apache Kafka百万级高并发消息中间件与原理解析 立即下载
MaxCompute技术公开课第四季 之 如何将Kafka数据同步至MaxCompute 立即下载
消息队列kafka介绍 立即下载