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 2019/01/14 09:11:32 UTC

[GitHub] xiangwangcheng commented on issue #687: Delete unmeaningful code MessageDecoder.decodeMessageId(msgId); as the code-optimization

xiangwangcheng commented on issue #687: Delete unmeaningful code MessageDecoder.decodeMessageId(msgId); as the code-optimization
URL: https://github.com/apache/rocketmq/issues/687#issuecomment-453938695
 
 
   @lemonzone2010  Yeah, I understand what you said. But `messageId = MessageDecoder.decodeMessageId(msgId);` is also invoked inside `this.viewMessage(msgId)` method:
   
    ```
      public MessageExt viewMessage(
           String msgId) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
   
           MessageId messageId = null;
           try {
               messageId = MessageDecoder.decodeMessageId(msgId);
           } catch (Exception e) {
               throw new MQClientException(ResponseCode.NO_MESSAGE, "query message by id finished, but no message.");
           }
           return this.mQClientFactory.getMQClientAPIImpl().viewMessage(RemotingUtil.socketAddress2String(messageId.getAddress()),
               messageId.getOffset(), timeoutMillis);
       }
   ```
   So, I still think it is redundant.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services