AndrewJSchofield commented on code in PR #23651:
URL: https://github.com/apache/kafka/pull/23651#discussion_r4261368318
##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -350,13 +350,25 @@ public KafkaProducer(Properties properties, Serializer<K>
keySerializer, Seriali
this(Utils.propsToMap(properties), keySerializer, valueSerializer);
}
+ KafkaProducer(ProducerConfig config,
+ Serializer<K> keySerializer,
+ Serializer<V> valueSerializer,
+ ProducerMetadata metadata,
+ KafkaClient kafkaClient,
+ ProducerInterceptors<K, V> interceptors,
+ ApiVersions apiVersions,
+ Time time) {
+ this(config, keySerializer, valueSerializer, metadata, kafkaClient,
Uuid.randomUuid(), interceptors, apiVersions, time);
Review Comment:
The callers of this constructor provide null for many of the parameters, so
I think there's scope for a little refactoring here. I don't want someone
starting to provide a non-null kafkaClient with a different client ID and then
this method to create a new random one which conflicts with it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]