You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/17 08:47:45 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #4063: [pulsar-common] MaxMessageSize to user configuration

sijie commented on a change in pull request #4063: [pulsar-common] MaxMessageSize to user configuration
URL: https://github.com/apache/pulsar/pull/4063#discussion_r276135792
 
 

 ##########
 File path: pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarDecoder.java
 ##########
 @@ -65,11 +69,30 @@
 import org.slf4j.LoggerFactory;
 
 public abstract class PulsarDecoder extends ChannelInboundHandlerAdapter {
-
     // Max message size is limited by max BookKeeper entry size which is 5MB, and we need to account
     // for headers as well.
-    public final static int MaxMessageSize = (5 * 1024 * 1024 - (10 * 1024));
-    public final static int MaxFrameSize = 5 * 1024 * 1024;
+    public static int MaxMessageSize;
+    public static int MaxFrameSize;
+
+    private static String commonConfigFile = Paths.get("").toAbsolutePath().normalize().toString() + "/conf/common.conf";
 
 Review comment:
   how can a client load this setting? 
   
   I am not sure it is a good approach to load such settings from a config file. A system property or environment variable (e.g. org.apache.pulsar.MaxMessageSize = xyz) is better. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services