2017-04-07 61 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,但這需要代理更改和重新啓動代理。

回答

相關問題