[ https://issues.apache.org/jira/browse/KAFKA-19543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009655#comment-18009655 ]
Matthias J. Sax edited comment on KAFKA-19543 at 7/24/25 5:09 PM: ------------------------------------------------------------------ Why is this a problem? Isn't it "by design" that the returned `Map` should become empty"when the consumer gets closed? was (Author: mjsax): Why is this a problem? Isn't it "by design" that the returned `Map` should become "empty" when the consumer get's closed? > The set of metrics returned from Consumer.metrics() changes after > Consumer.close() > ---------------------------------------------------------------------------------- > > Key: KAFKA-19543 > URL: https://issues.apache.org/jira/browse/KAFKA-19543 > Project: Kafka > Issue Type: Bug > Components: clients, consumer, metrics > Affects Versions: 4.1.0 > Reporter: Kirk True > Assignee: Kirk True > Priority: Minor > > metrics() reflects the current state, so if you get the metrics before you > close and then look at them afterward, some of the metrics are missing > because some were removed. -- This message was sent by Atlassian Jira (v8.20.10#820010)