Browse Source

KAFKA-1692 Include client ID in new producer IO thread name; reviewed by Neha Narkhede

pull/35/head
Ewen Cheslack-Postava 10 years ago committed by Neha Narkhede
parent
commit
7062ed7db3
  1. 3
      clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java

3
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java

@ -139,7 +139,8 @@ public class KafkaProducer implements Producer { @@ -139,7 +139,8 @@ public class KafkaProducer implements Producer {
config.getInt(ProducerConfig.TIMEOUT_CONFIG),
this.metrics,
new SystemTime());
this.ioThread = new KafkaThread("kafka-producer-network-thread", this.sender, true);
String ioThreadName = "kafka-producer-network-thread" + (clientId.length() > 0 ? " | " + clientId : "");
this.ioThread = new KafkaThread(ioThreadName, this.sender, true);
this.ioThread.start();
this.errors = this.metrics.sensor("errors");

Loading…
Cancel
Save