[ https://issues.apache.org/jira/browse/KAFKA-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096159#comment-14096159 ]
Joel Koshy commented on KAFKA-1567: ----------------------------------- Although this is in the old consumer and will be going away soon, I'm a bit curious about the approach in this patch - rather than enumerate the different metric names for consumers/producers in KafkaMetricsGroup wouldn't it have been simpler to just create a new MetricsRegistry for each instance of producer/consumer/broker? Whenever you shutdown an instance you would just need to remove all the metrics in the associated instance registry. > Metric memory leaking after closing the clients > ----------------------------------------------- > > Key: KAFKA-1567 > URL: https://issues.apache.org/jira/browse/KAFKA-1567 > Project: Kafka > Issue Type: Bug > Components: clients > Reporter: Jiangjie Qin > Assignee: Jiangjie Qin > Labels: patch > Fix For: 0.8.2 > > Attachments: KAFKA-1567.patch, KAFKA-1567.patch, KAFKA-1567.patch, > KAFKA-1567.patch, KAFKA-1567_2014-08-07_14:26:04.patch, > KAFKA-1567_2014-08-08_18:44:20.patch, KAFKA-1567_2014-08-11_15:55:26.patch, > KAFKA-1567_2014-08-12_15:20:10.patch, KAFKA-1567_2014-08-13_08:25:57.patch, > KAFKA-1567_2014-08-13_11:24:29.patch > > > When consumers or producers shut down, the metrics they registered in yammer > registry is not deleted which causes memory leak. -- This message was sent by Atlassian JIRA (v6.2#6252)