Github user lizhanhui commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/89#discussion_r115651498
  
    --- Diff: 
client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java ---
    @@ -306,6 +310,19 @@ public SendResult sendMessage(//
             final SendMessageContext context, // 11
             final DefaultMQProducerImpl producer // 12
         ) throws RemotingException, MQBrokerException, InterruptedException {
    +
    +        byte[] msgBody = msg.getBody();
    +        Integer sysFlag = requestHeader.getSysFlag();
    +        if (null != sysFlag && ((sysFlag & MessageSysFlag.COMPRESSED_FLAG) 
== MessageSysFlag.COMPRESSED_FLAG)) {
    +            try {
    +                msgBody = UtilAll.compress(msgBody, zipCompressLevel);
    +            } catch (IOException e) {
    +                
requestHeader.setSysFlag(MessageSysFlag.clearCompressedFlag(sysFlag));
    +                log.error("tryToCompressMessage exception", e);
    --- End diff --
    
    Got your point.  
    
    1. The code is moved here, and same log level should be applied IMO. 
@vongosling @vintagewang  any particular reason behind this? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to