zymap commented on a change in pull request #4247: [WIP] PIP-36: Support set 
message size in broker.conf
URL: https://github.com/apache/pulsar/pull/4247#discussion_r282732312
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
 ##########
 @@ -139,6 +140,15 @@ private static boolean argsContains(String[] args, String 
arg) {
                 brokerConfig = loadConfig(starterArguments.brokerConfigFile);
             }
 
+            int maxFrameSize = brokerConfig.getMaxMessageSize() + (10 * 1024);
+            if (maxFrameSize < 0) {
+                throw new IllegalArgumentException("Max message size need 
smaller than 5233640 bytes");
+            }
+            if (maxFrameSize > DirectMemoryUtils.maxDirectMemory()) {
 
 Review comment:
   Ok, will fix it as `>=`

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