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 on the client side, because the message was saved with 
information on the original topic and queue.
   
   So I think it's necessary to process on the broker side and replace the 
message's info with LMQ (topic, queueOffset and queueId).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to