codelipenghui commented on a change in pull request #6178: Introduce 
maxMessagePublishBufferSizeInMB configuration to avoid broker OOM
URL: https://github.com/apache/pulsar/pull/6178#discussion_r379402954
 
 

 ##########
 File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 ##########
 @@ -603,6 +603,23 @@
             doc = "Max number of snapshot to be cached per subscription.")
     private int replicatedSubscriptionsSnapshotMaxCachedPerSubscription = 10;
 
+    @FieldContext(
+        category = CATEGORY_SERVER,
+        doc = "Max memory size for broker handling messages sending from 
producers.\n\n"
+            + " If the processing message size exceed this value, broker will 
stop read data"
+            + " from the connection. The processing messages means messages 
are sends to broker"
+            + " but broker have not send response to client, usually waiting 
to write to bookies.\n\n"
+            + " It's shared across all the topics running in the same 
broker.\n\n"
+            + " Use -1 to disable the memory limitation. Default is 1/5 of 
direct memory.\n\n")
+    private int maxMessagePublishBufferSizeInMB = Math.max(64,
 
 Review comment:
   Maybe we'd better keep the default value to -1.

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