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

    https://github.com/apache/incubator-rocketmq/pull/140#discussion_r132086276
  
    --- Diff: 
broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java ---
    @@ -148,12 +148,13 @@ private RegisterBrokerResult registerBroker(
             requestHeader.setBrokerName(brokerName);
             requestHeader.setClusterName(clusterName);
             requestHeader.setHaServerAddr(haServerAddr);
    +        requestHeader.setCompressed(true);
             RemotingCommand request = 
RemotingCommand.createRequestCommand(RequestCode.REGISTER_BROKER, 
requestHeader);
     
             RegisterBrokerBody requestBody = new RegisterBrokerBody();
             requestBody.setTopicConfigSerializeWrapper(topicConfigWrapper);
             requestBody.setFilterServerList(filterServerList);
    -        request.setBody(requestBody.encode());
    +        request.setBody(requestBody.encode(true));
    --- End diff --
    
    Great idea!
    How about setting a threshold for compression being triggered, because if 
the data you compress is small, it overhead is higher than the benefits you get 
from the compression?


---
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