mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2026-02-22 05:35:43 +08:00
[#5538] message type was missing from TopicConfigInfo in rocketmq-dashboard
This commit is contained in:
@@ -19,6 +19,8 @@ import com.google.common.base.Objects;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.rocketmq.common.TopicConfig;
|
||||
|
||||
public class TopicConfigInfo {
|
||||
|
||||
private List<String> clusterNameList;
|
||||
@@ -30,6 +32,7 @@ public class TopicConfigInfo {
|
||||
private int readQueueNums;
|
||||
private int perm;
|
||||
private boolean order;
|
||||
private String messageType;
|
||||
|
||||
public List<String> getClusterNameList() {
|
||||
return clusterNameList;
|
||||
@@ -91,6 +94,14 @@ public class TopicConfigInfo {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public String getMessageType() {
|
||||
return messageType;
|
||||
}
|
||||
|
||||
public void setMessageType(TopicConfig topicConfig) {
|
||||
this.messageType = topicConfig.getAttributes().getOrDefault("message.type", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
@@ -102,12 +113,13 @@ public class TopicConfigInfo {
|
||||
readQueueNums == that.readQueueNums &&
|
||||
perm == that.perm &&
|
||||
order == that.order &&
|
||||
messageType == that.messageType &&
|
||||
Objects.equal(topicName, that.topicName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(topicName, writeQueueNums, readQueueNums, perm, order);
|
||||
return Objects.hashCode(topicName, writeQueueNums, readQueueNums, perm, order, messageType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ public class TopicServiceImpl extends AbstractCommonService implements TopicServ
|
||||
TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
|
||||
TopicConfig topicConfig = examineTopicConfig(topic, brokerData.getBrokerName());
|
||||
BeanUtils.copyProperties(topicConfig, topicConfigInfo);
|
||||
topicConfigInfo.setMessageType(topicConfig);
|
||||
topicConfigInfo.setBrokerNameList(Lists.newArrayList(brokerData.getBrokerName()));
|
||||
topicConfigInfoList.add(topicConfigInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user