GitHub user jawalesumit opened a pull request:
https://github.com/apache/kafka/pull/4234
KAFKA-6207 : Include start of record when RecordIsTooLarge
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.
To resolve this, I created a new function which will get the first 1KB of
the message (if the RecordTooLargeException is occurring), and the same will be
logged...
Thanks,
Sumit Jawale
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jawalesumit/kafka trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/4234.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4234
----
commit 686a3ff711018b4e80e622240cc250e6735d24c7
Author: jawalesumit <[email protected]>
Date: 2017-11-19T07:24:53Z
KAFKA-6207 : Include start of record when RecordIsTooLarge
----
---