2017-04-07 1018 views
1

我正在使用FlinkKafkaProducer08将记录发送到Kafka。但有时候我会遇到以下异常,即使我在错误消息中打印的记录太小,大小为0.02 MB。如何解决Kafka Producer中的RecordTooLargeException?

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 

试图更改生产者的max.request.size,但这需要代理更改和重新启动代理。

回答

相关问题