Close KafkaClient when streams client is closed
Author: Rajini Sivaram
Reviewers: Guozhang Wang Ismael Juma
Closes from rajinisivaram/KAFKA-5345
@@ -141,10 +141,14 @@ public class StreamsKafkaClient {
}
public void close() throws IOException {
+ try {
+ kafkaClient.close();
+ } finally {
for (MetricsReporter metricsReporter: this.reporters) {
metricsReporter.close();
}
}
+ }
/**
* Create a set of new topics using batch request.
