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

This commit is contained in:
Ewen Cheslack-Postava 2014-10-12 15:50:31 -07:00 committed by Neha Narkhede
parent 1733c0bfb0
commit 7062ed7db3
1 changed files with 2 additions and 1 deletions

View File

@ -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");