【发布时间】:2019-11-27 07:53:12
【问题描述】:
我正在使用 FlinkKafkaProducer08 将记录发送到 Kafka 。但是有时我会遇到以下异常,即使我在错误消息中打印的记录太小了 0.02 MB 。
java.lang.RuntimeException: Could not forward element to next operator
Caused by: java.lang.RuntimeException: Could not forward element to next operator
Caused by: java.lang.Exception: Failed to send data to Kafka: The message is 1513657 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration.
Caused by: org.apache.kafka.common.errors.RecordTooLargeException: The message is 1513657 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration
尝试更改 producer 上的 max.request.size ,但这需要代理更改并重新启动代理。
【问题讨论】:
标签: apache-kafka kafka-producer-api