Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-90

Include client IP per message queue of consumer progress command output

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.0-incubating
    • Fix Version/s: 4.1.0-incubating
    • Component/s: rocketmq-tools
    • Labels:
      None

      Description

      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.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lizhanhui commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          @zhouxinyu it's been merged.

          Show
          githubbot ASF GitHub Bot added a comment - Github user lizhanhui commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 @zhouxinyu it's been merged.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          @lizhanhui why did we close this PR without merge?

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 @lizhanhui why did we close this PR without merge?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lizhanhui closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/56

          Show
          githubbot ASF GitHub Bot added a comment - Github user lizhanhui closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/56
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          @lizhanhui +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 @lizhanhui +1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10824368/badge)](https://coveralls.io/builds/10824368)

          Coverage decreased (-0.2%) to 31.101% when pulling *cb8092a5cad021dad05497d9283dc0c5a3cef3bc on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10824368/badge)](https://coveralls.io/builds/10824368 ) Coverage decreased (-0.2%) to 31.101% when pulling * cb8092a5cad021dad05497d9283dc0c5a3cef3bc on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10824368/badge)](https://coveralls.io/builds/10824368)

          Coverage decreased (-0.2%) to 31.101% when pulling *cb8092a5cad021dad05497d9283dc0c5a3cef3bc on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10824368/badge)](https://coveralls.io/builds/10824368 ) Coverage decreased (-0.2%) to 31.101% when pulling * cb8092a5cad021dad05497d9283dc0c5a3cef3bc on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10824368/badge)](https://coveralls.io/builds/10824368)

          Coverage decreased (-0.2%) to 31.101% when pulling *cb8092a5cad021dad05497d9283dc0c5a3cef3bc on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10824368/badge)](https://coveralls.io/builds/10824368 ) Coverage decreased (-0.2%) to 31.101% when pulling * cb8092a5cad021dad05497d9283dc0c5a3cef3bc on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lizhanhui commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          @shroman Please re-check and help merge this issue if it's all right.

          Show
          githubbot ASF GitHub Bot added a comment - Github user lizhanhui commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 @shroman Please re-check and help merge this issue if it's all right.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          LGTM~

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 LGTM~
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lizhanhui commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          @shroman @vongosling Any idea on this PR?

          Show
          githubbot ASF GitHub Bot added a comment - Github user lizhanhui commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 @shroman @vongosling Any idea on this PR?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10096072/badge)](https://coveralls.io/builds/10096072)

          Coverage increased (+0.3%) to 31.58% when pulling *2874c569fd02501ec6ae97d3ee9377303c30bcb8 on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10096072/badge)](https://coveralls.io/builds/10096072 ) Coverage increased (+0.3%) to 31.58% when pulling * 2874c569fd02501ec6ae97d3ee9377303c30bcb8 on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10096072/badge)](https://coveralls.io/builds/10096072)

          Coverage increased (+0.3%) to 31.58% when pulling *2874c569fd02501ec6ae97d3ee9377303c30bcb8 on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10096072/badge)](https://coveralls.io/builds/10096072 ) Coverage increased (+0.3%) to 31.58% when pulling * 2874c569fd02501ec6ae97d3ee9377303c30bcb8 on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10096072/badge)](https://coveralls.io/builds/10096072)

          Coverage increased (+0.3%) to 31.58% when pulling *2874c569fd02501ec6ae97d3ee9377303c30bcb8 on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10096072/badge)](https://coveralls.io/builds/10096072 ) Coverage increased (+0.3%) to 31.58% when pulling * 2874c569fd02501ec6ae97d3ee9377303c30bcb8 on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10077780/badge)](https://coveralls.io/builds/10077780)

          Coverage increased (+0.3%) to 31.623% when pulling *c3bfdb770d7f30b7fecf19ad38903f4e57699d59 on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10077780/badge)](https://coveralls.io/builds/10077780 ) Coverage increased (+0.3%) to 31.623% when pulling * c3bfdb770d7f30b7fecf19ad38903f4e57699d59 on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/56

          [![Coverage Status](https://coveralls.io/builds/10077780/badge)](https://coveralls.io/builds/10077780)

          Coverage increased (+0.3%) to 31.623% when pulling *c3bfdb770d7f30b7fecf19ad38903f4e57699d59 on lizhanhui:ROCKETMQ-90* into *e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/56 [! [Coverage Status] ( https://coveralls.io/builds/10077780/badge)](https://coveralls.io/builds/10077780 ) Coverage increased (+0.3%) to 31.623% when pulling * c3bfdb770d7f30b7fecf19ad38903f4e57699d59 on lizhanhui: ROCKETMQ-90 * into * e6aaedcf4d23f95791c51fb510baf369c8b1f5c1 on apache:master *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user lizhanhui opened a pull request:

          https://github.com/apache/incubator-rocketmq/pull/56

          ROCKETMQ-90 Include client IP in consumerProgress command output

          Include client IP per message queue of consumer progress command output

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/lizhanhui/incubator-rocketmq ROCKETMQ-90

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-rocketmq/pull/56.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #56


          commit 09eecde747a14c84efd98f6dd01b03670e94c341
          Author: Zhanhui Li <lizhanhui@apache.org>
          Date: 2017-02-09T14:42:22Z

          Include client IP per message queue of consumer progress command output

          commit c3bfdb770d7f30b7fecf19ad38903f4e57699d59
          Author: Zhanhui Li <lizhanhui@apache.org>
          Date: 2017-02-09T14:46:17Z

          Format code


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user lizhanhui opened a pull request: https://github.com/apache/incubator-rocketmq/pull/56 ROCKETMQ-90 Include client IP in consumerProgress command output Include client IP per message queue of consumer progress command output You can merge this pull request into a Git repository by running: $ git pull https://github.com/lizhanhui/incubator-rocketmq ROCKETMQ-90 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/56.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #56 commit 09eecde747a14c84efd98f6dd01b03670e94c341 Author: Zhanhui Li <lizhanhui@apache.org> Date: 2017-02-09T14:42:22Z Include client IP per message queue of consumer progress command output commit c3bfdb770d7f30b7fecf19ad38903f4e57699d59 Author: Zhanhui Li <lizhanhui@apache.org> Date: 2017-02-09T14:46:17Z Format code

            People

            • Assignee:
              lizhanhui Zhanhui Li
              Reporter:
              lizhanhui Zhanhui Li
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development