Skip to content

Conversation

@kirktrue
Copy link
Contributor

@kirktrue kirktrue commented Dec 2, 2025

The intention of the Consumer API is that after close(), metrics()
should return an empty map of metrics. The lifecycle management of the
various metrics managers in the consumer is inconsistent. Some managers
remove all the metrics that were created, some registries remove some of
them, and some don't make any effort to remove the metrics at all.

This change introduces AbstractConsumerMetricsManager as a shared base
class for consumer metrics managers, consolidating the steps of metric
registration and cleanup logic, as well as unit tests to ensure that the
different metrics managers perform the cleanup step.

…Metrics

The intention of the Consumer API is that after close(), metrics()
should return an empty map of metrics. The lifecycle management of the
various metrics managers in the consumer is inconsistent. Some managers
remove all the metrics that were created, some registries remove some of
them, and some don't make any effort to remove the metrics at all.

This change introduces AbstractConsumerMetricsManager as a shared base
class for consumer metrics managers, consolidating the steps of metric
registration and cleanup logic, as well as unit tests to ensure that the
different metrics managers perform the cleanup step.
@github-actions github-actions bot added triage PRs from the community consumer clients labels Dec 2, 2025
* This class should not be invoked directly; users should instead create a {@link KafkaConsumer} as before.
* This consumer implements the new consumer group protocol and is intended to be the default in coming releases.
*/
public class AsyncKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this file was included by mistake 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I removed the unintentionally-added file. Thanks for catching it.

@github-actions github-actions bot removed the triage PRs from the community label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants