diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java index a4a581fc175ac..8a06641bd9287 100644 --- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java +++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java @@ -1082,6 +1082,12 @@ public class ServiceConfiguration implements PulsarConfiguration { ) private boolean bookkeeperClientExposeStatsToPrometheus = false; + @FieldContext( + category = CATEGORY_STORAGE_BK, + doc = "Throttle value for bookkeeper client" + ) + private int bookkeeperClientThrottleValue = 0; + /**** --- Managed Ledger --- ****/ @FieldContext( minValue = 1, diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java index 5d7f05b3fd59c..133a1f3043ac3 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java @@ -106,7 +106,7 @@ ClientConfiguration createBkClientConfiguration(ServiceConfiguration conf) { bkConf.setTLSTrustStorePasswordPath(conf.getBookkeeperTLSTrustStorePasswordPath()); } - bkConf.setThrottleValue(0); + bkConf.setThrottleValue(conf.getBookkeeperClientThrottleValue()); bkConf.setAddEntryTimeout((int) conf.getBookkeeperClientTimeoutInSeconds()); bkConf.setReadEntryTimeout((int) conf.getBookkeeperClientTimeoutInSeconds()); bkConf.setSpeculativeReadTimeout(conf.getBookkeeperClientSpeculativeReadTimeoutInMillis());