bruto1 commented on a change in pull request #10590: URL: https://github.com/apache/kafka/pull/10590#discussion_r642107164
########## File path: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java ########## @@ -920,23 +923,28 @@ private void throwIfProducerClosed() { " to class " + producerConfig.getClass(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG).getName() + " specified in key.serializer", cce); } - byte[] serializedValue; - try { - serializedValue = valueSerializer.serialize(record.topic(), record.headers(), record.value()); - } catch (ClassCastException cce) { - throw new SerializationException("Can't convert value of class " + record.value().getClass().getName() + + + setReadOnly(record.headers()); Review comment: fixed this one sorry for making you look for the cause, please have a look at the PR again -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org