Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.10.1.1
-
None
-
None
Description
When a message is too large to be sent (at org.apache.kafka.clients.producer.KafkaProducer#doSend), the RecordTooLargeException should carry the start of the record (for example, the first 1KB) so that the calling application can debug which message caused the error.
For example: one common use case of Kafka is logging. The RecordTooLargeException is thrown due to a large log message being sent by the application. How do you know which statement in your application logged this large message? If your exception has thousands of logging statements, it will be very tough to find which one is the cause today.... but you include the start of the message, this could prove a very strong hint as to the cause!