Hi all, with spring boot 2.4.x with spring cloud stream (kafka) the actuaor's configuration classes responsible for metrics create a kafka consumer that continuously log (every 60 sec.) an info message related to "committed offsets"
INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator: [Consumer clientId=myconsumer-monitoring, groupId=myGroup] Found no committed offset for partition testTopic-0
This message is obviously printed for every topic and for every partition in each topic.
Comment From: wilkinsona
Thanks for the report.
the actuator's configuration classes responsible for metrics create a kafka consumer
KafkaMetricsAutoConfiguration
shouldn't create any consumers (or producers). Instead, it adds listeners to the consumer and producer factories so that any consumers or producers created by those factories can be observed.
When a consumer or producer is created, an instance of Micrometer's KafkaClientMetrics
is created. KafkaClientMetrics
registers the metrics that Kafka exposes via KafkaConsumer#metrics
and KafkaProducer#metrics
. As far as I can tell, there's little that we can do to control the logging that occurs as a result of Kafka's own metrics being used.
Can you please expand a bit on why you believe that this is a Spring Boot problem?
Comment From: paulux84
Ok, thanks for clarification, so i suppose that the clientId progressive number is related to the created listners.
...you suppose that the problem is related to Micrometer classes and not to Spring Boot?
Il 14/06/21 15:38, Andy Wilkinson ha scritto:
Thanks for the report.
the actuator's configuration classes responsible for metrics create a kafka consumer
|KafkaMetricsAutoConfiguration| shouldn't create any consumers (or producers). Instead, it adds listeners to the consumer and producer factories so that any consumers or producers created by those factories can be observed.
When a consumer or producer is created, an instance of Micrometer's |KafkaClientMetrics| is created. |KafkaClientMetrics| registers the metrics that Kafka exposes via |KafkaConsumer#metrics| and |KafkaProducer#metrics|. As far as I can tell, there's little that we can do to control the logging that occurs as a result of Kafka's own metrics being used.
Can you please expand a bit on why you believe that this is a Spring Boot problem?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/26893#issuecomment-860692002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5ASIHLT2USQRIR6VRLEYDTSYA5XANCNFSM46VF2CPQ.
Comment From: wilkinsona
No, I don't think it's related to Micrometer either. From what you've described thus far it looks like standard Kafka metrics behaviour to me. As I tried to explain above, Micrometer just uses the metrics exposed by a KafkaConsumer
or KafkaProducer
. AFAIK, it will not trigger the creation of any consumers or producers.
If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: Alok255
The consumer metrics support is only available on spring boot 2.1+ versions.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.