apache / apache/rocketmq-exporter

rocketmq_group_get_latency_by_storetime always increase when comsumer model is BROADCASTING

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
324
Forks
178
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
rocketmq_group_get_latency_by_storetime is not correct when consumer model set to BROADCASTING

**To Reproduce**
Steps to reproduce the behavior:
1. create test topic
2. use a comsumer set the MessageModel to BROADCASTING
```python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
from rocketmq.client import PushConsumer, ConsumeStatus, Message, MessageModel

def callback(msg):
print(msg.id, msg.body)
return ConsumeStatus.CONSUME_SUCCESS

consumer = PushConsumer('test-comsumer')
consumer.set_name_server_address('localhost:9876')
consumer.set_message_model(MessageModel.BROADCASTING)
consumer.subscribe('test', callback)
consumer.set_group('test-comsumer')
consumer.start()

while True:
time.sleep(3600)
consumer.shutdown()
```
3. See exporter metrics data

**Expected behavior**
rocketmq_group_get_latency_by_storetime value must correct

**Screenshots**
![image](https://user-images.githubusercontent.com/9354439/96003480-d784e600-0e6c-11eb-97b1-9a08266c0fb8.png)
![image](https://user-images.githubusercontent.com/9354439/96003528-e370a800-0e6c-11eb-8311-a716c891248a.png)
![image](https://user-images.githubusercontent.com/9354439/96003609-faaf9580-0e6c-11eb-9860-944126db0757.png)

**Desktop (please complete the following information):**
- OS: CentOS 7.8
- Browser Chrome
- Version 84

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.