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

Consumer client can’t persist consume offset table to Broker

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.0-incubating
    • Fix Version/s: 4.0.0-incubating
    • Component/s: rocketmq-client
    • Labels:
      None

      Description

      RocketMQ version:4.0.0-SNAPSHOT

      When I use the consumer which in example/quickstart and used MessageListenerConcurrently MessageListener,I found that the consumer would reconsume message when I restarted it everytime.That is no sense,So I printed the log,found that when the consumer used RemoteBrokerOffsetStore to persist the consume offset table which always be zero.

      I found that the inner class ConsumeRequest in ConsumeMessageConcurrentlyService class has a bug in it.

      Let's have a see.

      ```java
      consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name());
      ```

      the consumeMessageContext not null only when ConsumeMessageConcurrentlyService.this.defaultMQPushConsumerImpl.hasHook() be TRUE.In the code,there is no IF clause,So,sometime will be cause NPE and can't update the consume offset table.

      Solution:

      Just remove the code above.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/32
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 85467dfd34d8ff379d2ddfec0489d78dcba20c27 in incubator-rocketmq's branch refs/heads/master from qinliujie
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=85467df ]

          Fix-35 ROCKETMQ-35 Reslove underlying NPE in ConsumeRequest, closes apache/incubator-rocketmq#32

          Show
          jira-bot ASF subversion and git services added a comment - Commit 85467dfd34d8ff379d2ddfec0489d78dcba20c27 in incubator-rocketmq's branch refs/heads/master from qinliujie [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=85467df ] Fix-35 ROCKETMQ-35 Reslove underlying NPE in ConsumeRequest, closes apache/incubator-rocketmq#32
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user qinliujie commented on the issue:

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

          @zhouxinyu I have edited my profile,you can look again.

          Show
          githubbot ASF GitHub Bot added a comment - Github user qinliujie commented on the issue: https://github.com/apache/incubator-rocketmq/pull/32 @zhouxinyu I have edited my profile,you can look again.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

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

          @qinliujie , I can't find your Github email from https://github.com/qinliujie, could you please provide it for me which is need in merge process.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/32 @qinliujie , I can't find your Github email from https://github.com/qinliujie , could you please provide it for me which is need in merge process.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vintagewang commented on the issue:

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

          review ok

          Show
          githubbot ASF GitHub Bot added a comment - Github user vintagewang commented on the issue: https://github.com/apache/incubator-rocketmq/pull/32 review ok
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

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

          It's a bug indeed, thanks @qinliujie . Please @vongosling @lizhanhui review.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/32 It's a bug indeed, thanks @qinliujie . Please @vongosling @lizhanhui review.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user qinliujie opened a pull request:

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

          ROCKETMQ-35 Consumer client can’t persist consume offset table to Broker

          https://issues.apache.org/jira/browse/ROCKETMQ-35

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

          $ git pull https://github.com/qinliujie/incubator-rocketmq Fix-35

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

          https://github.com/apache/incubator-rocketmq/pull/32.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 #32


          commit 80dedf0a63ae9297b79c376f1c3b2e8d12da5b2b
          Author: nantian <nantian@juanpi.com>
          Date: 2017-01-07T04:42:56Z

          ROCKETMQ-35 Consumer client can’t persist consume offset table to Broker
          https://issues.apache.org/jira/browse/ROCKETMQ-35


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user qinliujie opened a pull request: https://github.com/apache/incubator-rocketmq/pull/32 ROCKETMQ-35 Consumer client can’t persist consume offset table to Broker https://issues.apache.org/jira/browse/ROCKETMQ-35 You can merge this pull request into a Git repository by running: $ git pull https://github.com/qinliujie/incubator-rocketmq Fix-35 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/32.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 #32 commit 80dedf0a63ae9297b79c376f1c3b2e8d12da5b2b Author: nantian <nantian@juanpi.com> Date: 2017-01-07T04:42:56Z ROCKETMQ-35 Consumer client can’t persist consume offset table to Broker https://issues.apache.org/jira/browse/ROCKETMQ-35

            People

            • Assignee:
              vintagewang Xiaorui Wang
              Reporter:
              qinliujie qinliujie
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development