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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: