You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/03/08 10:28:43 UTC

[GitHub] [rocketmq-exporter] cserwen opened a new issue #95: The hash calculation error causes the label of metrics not to be updated.

cserwen opened a new issue #95:
URL: https://github.com/apache/rocketmq-exporter/issues/95


   **Describe the bug**
   When the consumer is closed, the `countOfOnlineConsumers` of metrhc: `rocketmq_group_diff` won't be changed to 0.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Start a consumer and running for a while.
   2. Shutdown it and you will see the value of `countOfOnlineConsumers` still is 1.
   
   **Expected behavior**
   The value of `countOfOnlineConsumers` should be 0.
   
   **Screenshots**
   
   
   **Additional context**
   The root cause is that the following code.
   https://github.com/apache/rocketmq-exporter/blob/85cf9058b9df3cc756562f59f3d27bd6efa9b8b0/src/main/java/org/apache/rocketmq/exporter/model/metrics/ConsumerTopicDiffMetric.java#L65
   The class `ConsumerTopicDiffMetric` has four fields:
   ```java
   private String group;
   private String topic;
   private String countOfOnlineConsumers;
   private String msgModel; //0:broadcast, 1:cluster
   ```
   It only calculates `topic` abd `group`. So when countOfOnlineConsumers changed, The new key will not be added. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-exporter] duhenglucky closed issue #95: The hash calculation error causes the label of metrics not to be updated.

Posted by GitBox <gi...@apache.org>.
duhenglucky closed issue #95:
URL: https://github.com/apache/rocketmq-exporter/issues/95


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org