lbradstreet commented on pull request #10704:
URL: https://github.com/apache/kafka/pull/10704#issuecomment-841831977
@ijuma I'm admittedly very confused by this too. I followed the producer
configs through everywhere it's passed and can't see anywhere that it seems
likely to be called concurrently. There are a few places that seem suspicious
(channel builder code, etc) by the time it calls logUnused.
`doSend` will use it later on, but by then the constructor will have had to
have returned:
```
try {
serializedKey = keySerializer.serialize(record.topic(),
record.headers(), record.key());
} catch (ClassCastException cce) {
throw new SerializationException("Can't convert key of class
" + record.key().getClass().getName() +
" to class " +
producerConfig.getClass(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG).getName() +
" specified in key.serializer", cce);
}
```
--
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:
[email protected]