ijuma commented on a change in pull request #8605:
URL: https://github.com/apache/kafka/pull/8605#discussion_r419185106



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
##########
@@ -284,7 +283,8 @@ public KafkaProducer(final Map<String, Object> configs) {
      *                         be called in the producer when the serializer 
is passed in directly.
      */
     public KafkaProducer(Map<String, Object> configs, Serializer<K> 
keySerializer, Serializer<V> valueSerializer) {
-        this(configs, keySerializer, valueSerializer, null, null, null, 
Time.SYSTEM);
+        this(new ProducerConfig(ProducerConfig.addSerializerToConfig(configs, 
keySerializer, valueSerializer)),

Review comment:
       Yeah, it's a bit error prone to have that logic in every constructor. We 
could move the `propsToMap` method to a utility class and use it on the 
consumer too.




----------------------------------------------------------------
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


Reply via email to