rushsky518 opened a new issue #1936: polish 
PullMessageProcessor#readGetMessageResult
URL: https://github.com/apache/rocketmq/issues/1936
 
 
   In `PullMessageProcessor#readGetMessageResult`, variable storeTimestamp is 
setted too many times.
   ````java
   List<ByteBuffer> messageBufferList = getMessageResult.getMessageBufferList();
   for (ByteBuffer bb : messageBufferList) {
   
        byteBuffer.put(bb);
        int sysFlag = bb.getInt(MessageDecoder.SYSFLAG_POSITION);
   //                bornhost has the IPv4 ip if the 
MessageSysFlag.BORNHOST_V6_FLAG bit of sysFlag is 0
   //                IPv4 host = ip(4 byte) + port(4 byte); IPv6 host = ip(16 
byte) + port(4 byte)
        int bornhostLength = (sysFlag & MessageSysFlag.BORNHOST_V6_FLAG) == 0 ? 
8 : 20;
        int msgStoreTimePos = 4 // 1 TOTALSIZE
                + 4 // 2 MAGICCODE
                + 4 // 3 BODYCRC
                + 4 // 4 QUEUEID
                + 4 // 5 FLAG
                + 8 // 6 QUEUEOFFSET
                + 8 // 7 PHYSICALOFFSET
                + 4 // 8 SYSFLAG
                + 8 // 9 BORNTIMESTAMP
                + bornhostLength; // 10 BORNHOST
        storeTimestamp = bb.getLong(msgStoreTimePos);
   }
   ````
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to