From 37a966f5ce501b82239846243dbf95c0649cafbd Mon Sep 17 00:00:00 2001 From: HuanliMeng <48120384+Huanli-Meng@users.noreply.github.com> Date: Sun, 28 Jun 2020 18:46:35 +0800 Subject: [PATCH] update for pr:Restore clusterDispatchRate policy for compatibility --- site2/docs/admin-api-namespaces.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/site2/docs/admin-api-namespaces.md b/site2/docs/admin-api-namespaces.md index 7cd0c1d9d72ce..0d19e7e81a150 100644 --- a/site2/docs/admin-api-namespaces.md +++ b/site2/docs/admin-api-namespaces.md @@ -554,11 +554,18 @@ admin.namespaces().getRetention(namespace) #### set dispatch throttling -It sets message dispatch rate for all the topics under a given namespace. +It sets message dispatch rate for all the topics under a given namespace. Dispatch rate can be restricted by number of message per X seconds (`msg-dispatch-rate`) or by number of message-bytes per X second (`byte-dispatch-rate`). dispatch rate is in second and it can be configured with `dispatch-rate-period`. Default value of `msg-dispatch-rate` and `byte-dispatch-rate` is -1 which disables the throttling. +#### Note +> - If neither `clusterDispatchRate` nor `topicDispatchRate` is configured, dispatch throttling is disabled. +> > +> - If `topicDispatchRate` is not configured, `clusterDispatchRate` takes effect. +> > +> - If `topicDispatchRate` is configured, `topicDispatchRate` takes effect. + ###### CLI ``` @@ -669,7 +676,7 @@ $ pulsar-admin namespaces get-subscription-dispatch-rate test-tenant/ns1 admin.namespaces().getSubscriptionDispatchRate(namespace) ``` -#### set dispatch throttling for subscription +#### set dispatch throttling for replicator It sets message dispatch rate for all the replicator between replication clusters under a given namespace. Dispatch rate can be restricted by number of message per X seconds (`msg-dispatch-rate`) or by number of message-bytes per X second (`byte-dispatch-rate`).