chia7712 commented on a change in pull request #8826: URL: https://github.com/apache/kafka/pull/8826#discussion_r533092986
########## File path: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java ########## @@ -314,27 +315,23 @@ public KafkaProducer(Properties properties) { * be called in the producer when the serializer is passed in directly. */ public KafkaProducer(Properties properties, Serializer<K> keySerializer, Serializer<V> valueSerializer) { - this(Utils.propsToMap(properties), keySerializer, valueSerializer, null, null, null, - Time.SYSTEM); + this(Utils.propsToMap(properties), keySerializer, valueSerializer); } // visible for testing @SuppressWarnings("unchecked") - KafkaProducer(Map<String, Object> configs, + KafkaProducer(ProducerConfig config, Serializer<K> keySerializer, Serializer<V> valueSerializer, ProducerMetadata metadata, KafkaClient kafkaClient, ProducerInterceptors<K, V> interceptors, Time time) { - ProducerConfig config = new ProducerConfig(ProducerConfig.appendSerializerToConfig(configs, keySerializer, - valueSerializer)); try { - Map<String, Object> userProvidedConfigs = config.originals(); this.producerConfig = config; this.time = time; - String transactionalId = (String) userProvidedConfigs.get(ProducerConfig.TRANSACTIONAL_ID_CONFIG); + String transactionalId = (String) config.originals().get(ProducerConfig.TRANSACTIONAL_ID_CONFIG); Review comment: good point. ---------------------------------------------------------------- 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