This is an automated email from the ASF dual-hosted git repository.
liuyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new bea6ee5e454 [improve][doc] improve `pulsar-admin namespaces
set-backlog-quota` (#394)
bea6ee5e454 is described below
commit bea6ee5e4544d8c18c4391933039021d06bdbb54
Author: labuladong <[email protected]>
AuthorDate: Mon Feb 6 09:36:30 2023 +0800
[improve][doc] improve `pulsar-admin namespaces set-backlog-quota` (#394)
---
docs/reference-pulsar-admin.md | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/docs/reference-pulsar-admin.md b/docs/reference-pulsar-admin.md
index a121c1680d3..429e89bf1fb 100644
--- a/docs/reference-pulsar-admin.md
+++ b/docs/reference-pulsar-admin.md
@@ -1240,26 +1240,29 @@ pulsar-admin namespaces set-backlog-quota
tenant/namespace options
Options
-|Flag|Description|Default|
-|----|---|---|
-|`-l`, `--limit`|The backlog size limit (for example `10M` or `16G`)||
-|`-lt`, `--limitTime`|Time limit in second (or minutes, hours, days, weeks eg:
100m, 3h, 2d, 5w), non-positive number for disabling time limit. (for example
3600 for 1 hour)||
-|`-p`, `--policy`|The retention policy to enforce when the limit is reached.
The valid options are: `producer_request_hold`, `producer_exception` or
`consumer_backlog_eviction`|
-|`-t`, `--type`|Backlog quota type to set. The valid options are:
`destination_storage`, `message_age` |destination_storage|
+| Flag | Description
| Default
|
+|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
+| `-t`, `--type` | The backlog quota type. The valid options are:
`destination_storage` and `message_age`.
|
destination_storage |
+| `-l`, `--limit` | If the backlog quota type is set to
`destination_storage`, you can use this parameter to set the backlog size limit
(for example, `10MB` or `16GB`). To disable the size limit, use a non-positive
number. ||
+| `-lt`, `--limitTime` | If the backlog quota type is set to `message_age`,
you can use this parameter to set the time limit in seconds (or minutes, hours,
days, weeks, e.g., 100m, 3h, 2d, 5w). To disable the time limit, use a
non-positive number. ||
+| `-p`, `--policy` | The retention policy to enforce when the limit is
reached. The valid options are: `producer_request_hold`, `producer_exception`,
and `consumer_backlog_eviction`. |
+
+If you want to set both the time limit and the size limit, you need to set
them separately.
Example
```bash
pulsar-admin namespaces set-backlog-quota my-tenant/my-ns \
---limit 2G \
---policy producer_request_hold
+ --type destination_storage \
+ --limit 2G \
+ --policy producer_request_hold
```
```bash
pulsar-admin namespaces set-backlog-quota my-tenant/my-ns \
---limitTime 3600 \
---policy producer_request_hold \
---type message_age
+ --limitTime 3600 \
+ --policy producer_request_hold \
+ --type message_age
```
### `remove-backlog-quota`