[ 
https://issues.apache.org/jira/browse/ROCKETMQ-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946723#comment-15946723
 ] 

ASF GitHub Bot commented on ROCKETMQ-90:
----------------------------------------

Github user shroman commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/56#discussion_r108617467
  
    --- Diff: 
tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java
 ---
    @@ -94,12 +117,14 @@ public void execute(CommandLine commandLine, Options 
options, RPCHook rpcHook) {
                             lastTime = UtilAll.formatDate(new 
Date(offsetWrapper.getLastTimestamp()), UtilAll.YYYY_MM_DD_HH_MM_SS);
                         } catch (Exception e) {
                         }
    -                    System.out.printf("%-32s  %-32s  %-4d  %-20d  %-20d  
%-20d  %s%n",
    +
    +                    System.out.printf("%-32s  %-32s  %-4d  %-20d  %-20d  
%-20s %-20d  %s%n",
                             UtilAll.frontStringAtLeast(mq.getTopic(), 32),
                             UtilAll.frontStringAtLeast(mq.getBrokerName(), 32),
                             mq.getQueueId(),
                             offsetWrapper.getBrokerOffset(),
                             offsetWrapper.getConsumerOffset(),
    +                        messageQueueAllocationResult.containsKey(mq) ? 
messageQueueAllocationResult.get(mq) : "NA",
    --- End diff --
    
    Not that important here, but you can do the same with accessing 
`messageQueueAllocationResult` only once. `get()` and see if it is null.


> Include client IP per message queue of consumer progress command output
> -----------------------------------------------------------------------
>
>                 Key: ROCKETMQ-90
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-90
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>          Components: rocketmq-tools
>    Affects Versions: 4.1.0-incubating
>            Reporter: Zhanhui Li
>            Assignee: Zhanhui Li
>            Priority: Minor
>
> Sometimes we monitor message accumulation which is not caused by traffic 
> surge, instead by buggy application consuming code. If we can quickly figure 
> out IP of which client(s) is experiencing  glitches, it saves much time 
> diagnosing issues.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to