in src/main/java/org/apache/rocketmq/dashboard/service/impl/TopicServiceImpl.java [155:182]
private TopicTypeMeta classifyTopicType(String topicName, Map<String,String> attributes, Set<String> sysTopics) {
TopicTypeMeta topicType = new TopicTypeMeta();
topicType.setTopicName(topicName);
if (topicName.startsWith("%R")) {
topicType.setMessageType("RETRY");
return topicType;
} else if (topicName.startsWith("%D")) {
topicType.setMessageType("DLQ");
return topicType;
} else if (sysTopics.contains(topicName) || topicName.startsWith("rmq_sys") || topicName.equals("DefaultHeartBeatSyncerTopic")) {
topicType.setMessageType("SYSTEM");
topicType.setTopicName(String.format("%s%s", "%SYS%", topicName));
return topicType;
}
if (attributes == null || attributes.isEmpty()) {
topicType.setMessageType("UNSPECIFIED");
return topicType;
}
String messageType = attributes.get(TOPIC_MESSAGE_TYPE_ATTRIBUTE.getName());
if (StringUtils.isBlank(messageType)) {
messageType = TopicMessageType.UNSPECIFIED.name();
}
topicType.setMessageType(messageType);
return topicType;
}