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 2021/09/11 06:37:13 UTC

[GitHub] [rocketmq-dashboard] StyleTang commented on a change in pull request #21: [ISSUE #19]Message track query enhancement

StyleTang commented on a change in pull request #21:
URL: https://github.com/apache/rocketmq-dashboard/pull/21#discussion_r706566464



##########
File path: src/main/java/org/apache/rocketmq/dashboard/controller/MessageTraceController.java
##########
@@ -64,7 +64,7 @@ public Object viewTraceMessages(@RequestParam String msgId) {
 
     @RequestMapping(value = "/viewMessageTraceGraph.query", method = RequestMethod.GET)
     @ResponseBody
-    public MessageTraceGraph viewMessageTraceGraph(@RequestParam String msgId) {
-        return messageTraceService.queryMessageTraceGraph(msgId);
+    public MessageTraceGraph viewMessageTraceGraph(@RequestParam String msgId, @RequestParam String traceTopic) {

Review comment:
       Is traceTopic must have? maybe we can use the default value if use don't choose the topic.
   ```
   @RequestParam String traceTopic
   ```

##########
File path: src/main/java/org/apache/rocketmq/dashboard/service/impl/TopicServiceImpl.java
##########
@@ -61,16 +61,28 @@
     private RMQConfigure configure;
 
     @Override
-    public TopicList fetchAllTopicList(boolean skipSysProcess) {
+    public TopicList fetchAllTopicList(boolean skipSysProcess, boolean skipRetryAndDlq) {
         try {
             TopicList allTopics = mqAdminExt.fetchAllTopicList();
             if (skipSysProcess) {
                 return allTopics;
             }
 
-            TopicList sysTopics = getSystemTopicList();
             Set<String> topics = new HashSet<>();
+            if (skipRetryAndDlq) {

Review comment:
       1. What will happen if both skipSysProcess and skipRetryAndDlq are true.
   2. maybe we can handle skipSysProcess and skipRetryAndDlq together, for example use Java lambda stream.
   ```java
   allTopics.getTopicList().stream().map((item)->{
                   ...
               }).filter(new Predicate<String>() {
                   @Override
                   public boolean apply(@Nullable String input) {
                       ...
                   }
               }).collect(Collectors.toSet());
   ```




-- 
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