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 2022/02/12 09:06:37 UTC

[GitHub] [rocketmq] yuz10 commented on a change in pull request #3838: [ISSUE #3804]Commit consumption offset with specific MessageQueue.

yuz10 commented on a change in pull request #3838:
URL: https://github.com/apache/rocketmq/pull/3838#discussion_r805138896



##########
File path: client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java
##########
@@ -645,21 +645,39 @@ private void removePullTask(final String topic) {
     }
 
     public synchronized void commitAll() {
-        try {
-            for (MessageQueue messageQueue : assignedMessageQueue.messageQueues()) {
-                long consumerOffset = assignedMessageQueue.getConsumerOffset(messageQueue);
-                if (consumerOffset != -1) {
-                    ProcessQueue processQueue = assignedMessageQueue.getProcessQueue(messageQueue);
-                    if (processQueue != null && !processQueue.isDropped()) {
-                        updateConsumeOffset(messageQueue, consumerOffset);
-                    }
-                }
+        for (MessageQueue messageQueue : assignedMessageQueue.messageQueues()) {

Review comment:
       the following code is missing in new commitAll:
   ```
   if (defaultLitePullConsumer.getMessageModel() == MessageModel.BROADCASTING) {
                   offsetStore.persistAll(assignedMessageQueue.messageQueues());
   }
   ```




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