You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "HScarb (via GitHub)" <gi...@apache.org> on 2023/04/12 17:19:22 UTC

[GitHub] [rocketmq] HScarb commented on a diff in pull request #6577: [ISSUE #6576] Fix pop lmq message

HScarb commented on code in PR #6577:
URL: https://github.com/apache/rocketmq/pull/6577#discussion_r1164426234


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:
##########
@@ -643,14 +643,41 @@ private CompletableFuture<Long> popMsgFromQueue(boolean isRetry, GetMessageResul
 
                 atomicRestNum.set(result.getMaxOffset() - result.getNextBeginOffset() + atomicRestNum.get());
                 String brokerName = brokerController.getBrokerConfig().getBrokerName();
-                for (SelectMappedBufferResult mapedBuffer : result.getMessageMapedList()) {
-                    // We should not recode buffer for normal topic message
-                    if (!isRetry) {
-                        getMessageResult.addMessage(mapedBuffer);
+                for (SelectMappedBufferResult mappedBuffer : result.getMessageMapedList()) {
+                    if (MixAll.isLmq(topic)) {
+                        List<MessageExt> messageExtList = MessageDecoder.decodesBatch(mappedBuffer.getByteBuffer(),

Review Comment:
   Indeed. 
   I've tried to process it on the client side at first, but we can't get LMQ's queueOffset and queue ID in the client side, because the message was saved with information on the original topic and queue.



-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org