poorbarcode commented on code in PR #24423:
URL: https://github.com/apache/pulsar/pull/24423#discussion_r2375601655


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -919,6 +919,58 @@ The max allowed delay for delayed delivery (in 
milliseconds). If the broker rece
     )
     private int brokerMaxConnections = 0;
 
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "It relates to configuration \"WriteBufferHighWaterMark\" of 
Netty Channel Config. If the number of bytes"
+            + " queued in the write buffer exceeds this value, channel 
writable state will start to return \"false\"."
+    )
+    private int pulsarChannelWriteBufferHighWaterMark = 64 * 1024;
+
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "It relates to configuration \"WriteBufferLowWaterMark\" of 
Netty Channel Config. If the number of bytes"
+                + " queued in the write buffer is smaller than this value, 
channel writable state will start to return"
+                + " \"true\"."
+    )
+    private int pulsarChannelWriteBufferLowWaterMark = 32 * 1024;
+
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "If enabled, the broker will pause reading from the channel to 
deal with new request once the writer"
+            + " buffer is full, until it is changed to writable."
+    )
+    private boolean pulsarChannelPauseReceivingRequestsIfUnwritable = false;
+
+    @FieldContext(
+            category = CATEGORY_POLICIES,
+            doc = "After the connection is recovered from an pause receiving 
state, the channel will be rate-limited"
+                + " for a of time window to avoid overwhelming due to the 
backlog of requests. This parameter defines"
+                + " how long the rate limiting should last, in millis. Once 
the bytes that are waiting to be sent out"
+                + " reach the \"pulsarChannelWriteBufferHighWaterMark\", the 
timer will be reset. Setting a negative"
+                + " value will disable the rate limiting."
+    )
+    private int pulsarChannelPauseReceivingCooldownMs = 5000;
+
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "After the connection is recovered from a pause receiving state, 
the channel will be rate-limited for a"
+            + " period of time to avoid overwhelming due to the backlog of 
requests. This parameter defines how"
+            + " many requests should be allowed in the rate limiting period."
+
+    )
+    private int pulsarChannelPauseReceivingCooldownRateLimitPermits = 5;
+
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "After the connection is recovered from a pause receiving state, 
the channel will be rate-limited for a"
+            + " period of time defined by 
pulsarChannelPauseReceivingCooldownSeconds to avoid overwhelming due to the"
+            + " backlog of requests. This parameter defines the period of the 
rate limiter in milliseconds. If the rate"
+            + " limit period is set to 1000, then the unit is requests per 
second. When it's 10, the unit is requests"
+            + " per every 10ms."
+
+    )
+    private int pulsarChannelPauseReceivingCooldownRateLimitPeriod = 10;

Review Comment:
   Renamed



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to