Hi everyone, Thanks for all that valuable feedback. So we have a consensus not to use Record.
I have updated to PR by creating 2 childs classes KeyDeserializationException and ValueDeserializationException. Those classes directly embed the required fields. I do not think a wrapper object would be useful in that case. I still had to update checkstyle as Headers class is not allowed for import in the Errors package. I do not think it's an issue to add that authorization as Headers is already used in consumerRecord, so already public. The proposed PR https://github.com/apache/kafka/pull/15691/files If it's ok I will update the KIP. Regards, Fred