mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2026-02-21 12:55:44 +08:00
Support FIFO-Type SubGroup Add、Update and Query For V5 (#204)
* Support dashboard v4-v5 switch And query for v5 topic * Modify tag name * Support subGroup FIFO Type Query and Update --------- Co-authored-by: yuanziwei <yuanziwei@xiaomi.com>
This commit is contained in:
@@ -27,6 +27,8 @@ public class GroupConsumeInfo implements Comparable<GroupConsumeInfo> {
|
||||
private MessageModel messageModel;
|
||||
private int consumeTps;
|
||||
private long diffTotal = -1;
|
||||
private String subGroupType = "NORMAL";
|
||||
|
||||
|
||||
public String getGroup() {
|
||||
return group;
|
||||
@@ -91,4 +93,12 @@ public class GroupConsumeInfo implements Comparable<GroupConsumeInfo> {
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getSubGroupType() {
|
||||
return subGroupType;
|
||||
}
|
||||
|
||||
public void setSubGroupType(String subGroupType) {
|
||||
this.subGroupType = subGroupType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +177,10 @@ public class ConsumerServiceImpl extends AbstractCommonService implements Consum
|
||||
}
|
||||
|
||||
ConsumerConnection consumerConnection = null;
|
||||
boolean isFifoType = examineSubscriptionGroupConfig(consumerGroup)
|
||||
.stream().map(ConsumerConfigInfo::getSubscriptionGroupConfig)
|
||||
.allMatch(SubscriptionGroupConfig::isConsumeMessageOrderly);
|
||||
|
||||
try {
|
||||
consumerConnection = mqAdminExt.examineConsumerConnectionInfo(consumerGroup);
|
||||
}
|
||||
@@ -185,6 +189,13 @@ public class ConsumerServiceImpl extends AbstractCommonService implements Consum
|
||||
}
|
||||
|
||||
groupConsumeInfo.setGroup(consumerGroup);
|
||||
if (SYSTEM_GROUP_SET.contains(consumerGroup)) {
|
||||
groupConsumeInfo.setSubGroupType("SYSTEM");
|
||||
} else if (isFifoType) {
|
||||
groupConsumeInfo.setSubGroupType("FIFO");
|
||||
} else {
|
||||
groupConsumeInfo.setSubGroupType("NORMAL");
|
||||
}
|
||||
|
||||
if (consumeStats != null) {
|
||||
groupConsumeInfo.setConsumeTps((int)consumeStats.getConsumeTps());
|
||||
|
||||
Reference in New Issue
Block a user