You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2019/04/01 08:57:46 UTC
[pulsar] branch asf-site updated: Updated site at revision e36ae70
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 50d7af3 Updated site at revision e36ae70
50d7af3 is described below
commit 50d7af36b5a3530d9ba78643b74e96a077ae5c2a
Author: jenkins <bu...@apache.org>
AuthorDate: Mon Apr 1 08:57:38 2019 +0000
Updated site at revision e36ae70
---
.../2.1.0-incubating/cookbooks-non-persistent.html | 2 +-
.../cookbooks-non-persistent/index.html | 2 +-
.../cookbooks-retention-expiry.html | 50 +++++++++++-----------
.../cookbooks-retention-expiry/index.html | 50 +++++++++++-----------
.../2.1.0-incubating/functions-guarantees.html | 20 ++++-----
.../functions-guarantees/index.html | 20 ++++-----
.../2.1.1-incubating/cookbooks-non-persistent.html | 2 +-
.../cookbooks-non-persistent/index.html | 2 +-
.../cookbooks-retention-expiry.html | 50 +++++++++++-----------
.../cookbooks-retention-expiry/index.html | 50 +++++++++++-----------
.../2.1.1-incubating/functions-guarantees.html | 20 ++++-----
.../functions-guarantees/index.html | 20 ++++-----
.../docs/zh-CN/2.2.0/cookbooks-non-persistent.html | 2 +-
.../2.2.0/cookbooks-non-persistent/index.html | 2 +-
.../zh-CN/2.2.0/cookbooks-retention-expiry.html | 50 +++++++++++-----------
.../2.2.0/cookbooks-retention-expiry/index.html | 50 +++++++++++-----------
content/docs/zh-CN/2.2.0/functions-guarantees.html | 20 ++++-----
.../zh-CN/2.2.0/functions-guarantees/index.html | 20 ++++-----
.../docs/zh-CN/2.2.1/cookbooks-non-persistent.html | 2 +-
.../2.2.1/cookbooks-non-persistent/index.html | 2 +-
.../zh-CN/2.2.1/cookbooks-retention-expiry.html | 50 +++++++++++-----------
.../2.2.1/cookbooks-retention-expiry/index.html | 50 +++++++++++-----------
content/docs/zh-CN/2.2.1/functions-guarantees.html | 20 ++++-----
.../zh-CN/2.2.1/functions-guarantees/index.html | 20 ++++-----
content/docs/zh-CN/cookbooks-non-persistent.html | 2 +-
.../docs/zh-CN/cookbooks-non-persistent/index.html | 2 +-
content/docs/zh-CN/cookbooks-retention-expiry.html | 42 +++++++++---------
.../zh-CN/cookbooks-retention-expiry/index.html | 42 +++++++++---------
content/docs/zh-CN/functions-guarantees.html | 20 ++++-----
content/docs/zh-CN/functions-guarantees/index.html | 20 ++++-----
.../zh-CN/next/admin-api-partitioned-topics.html | 2 +-
.../next/admin-api-partitioned-topics/index.html | 2 +-
.../docs/zh-CN/next/cookbooks-non-persistent.html | 2 +-
.../zh-CN/next/cookbooks-non-persistent/index.html | 2 +-
.../zh-CN/next/cookbooks-retention-expiry.html | 50 +++++++++++-----------
.../next/cookbooks-retention-expiry/index.html | 50 +++++++++++-----------
content/docs/zh-CN/next/functions-guarantees.html | 22 +++++-----
.../zh-CN/next/functions-guarantees/index.html | 22 +++++-----
content/swagger/swagger.json | 36 ++++++++--------
39 files changed, 446 insertions(+), 446 deletions(-)
diff --git a/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent.html b/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent.html
index 8273f6b..48a339e 100644
--- a/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent.html
+++ b/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent/index.html b/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent/index.html
index 8273f6b..48a339e 100644
--- a/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent/index.html
+++ b/content/docs/zh-CN/2.1.0-incubating/cookbooks-non-persistent/index.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry.html b/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry.html
index 6eb99a7..3a5c86d 100644
--- a/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry.html
+++ b/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry/index.html b/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry/index.html
index 6eb99a7..3a5c86d 100644
--- a/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry/index.html
+++ b/content/docs/zh-CN/2.1.0-incubating/cookbooks-retention-expiry/index.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.1.0-incubating/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.1.0-incubating/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.0-incubating/functions-guarantees.html b/content/docs/zh-CN/2.1.0-incubating/functions-guarantees.html
index 8f910af..ad6ca92 100644
--- a/content/docs/zh-CN/2.1.0-incubating/functions-guarantees.html
+++ b/content/docs/zh-CN/2.1.0-incubating/functions-guarantees.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.1.0-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.1.0-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processingGuarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processingGuarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying pro [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing g [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.0-incubating/functions-guarantees/index.html b/content/docs/zh-CN/2.1.0-incubating/functions-guarantees/index.html
index 8f910af..ad6ca92 100644
--- a/content/docs/zh-CN/2.1.0-incubating/functions-guarantees/index.html
+++ b/content/docs/zh-CN/2.1.0-incubating/functions-guarantees/index.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.1.0-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.1.0-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processingGuarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.1.0-incubating/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processingGuarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying pro [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.0-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.0-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing g [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent.html b/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent.html
index 96be030..6c7b997 100644
--- a/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent.html
+++ b/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent/index.html b/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent/index.html
index 96be030..6c7b997 100644
--- a/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent/index.html
+++ b/content/docs/zh-CN/2.1.1-incubating/cookbooks-non-persistent/index.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry.html b/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry.html
index a122e99..e6f3bfb 100644
--- a/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry.html
+++ b/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry/index.html b/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry/index.html
index a122e99..e6f3bfb 100644
--- a/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry/index.html
+++ b/content/docs/zh-CN/2.1.1-incubating/cookbooks-retention-expiry/index.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.1.1-incubating/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.1.1-incubating/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></ [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.1-incubating/functions-guarantees.html b/content/docs/zh-CN/2.1.1-incubating/functions-guarantees.html
index e4d6b45..058fa6f 100644
--- a/content/docs/zh-CN/2.1.1-incubating/functions-guarantees.html
+++ b/content/docs/zh-CN/2.1.1-incubating/functions-guarantees.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.1.1-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.1.1-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processingGuarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processingGuarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying pro [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing g [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.1.1-incubating/functions-guarantees/index.html b/content/docs/zh-CN/2.1.1-incubating/functions-guarantees/index.html
index e4d6b45..058fa6f 100644
--- a/content/docs/zh-CN/2.1.1-incubating/functions-guarantees/index.html
+++ b/content/docs/zh-CN/2.1.1-incubating/functions-guarantees/index.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.1.1-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.1.1-incubating"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processingGuarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.1.1-incubating/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processingGuarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying pro [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.1.1-incubating/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.1.1-incubating/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing g [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.0/cookbooks-non-persistent.html b/content/docs/zh-CN/2.2.0/cookbooks-non-persistent.html
index 2deb849..9e7a77e 100644
--- a/content/docs/zh-CN/2.2.0/cookbooks-non-persistent.html
+++ b/content/docs/zh-CN/2.2.0/cookbooks-non-persistent.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.2.0/cookbooks-non-persistent/index.html b/content/docs/zh-CN/2.2.0/cookbooks-non-persistent/index.html
index 2deb849..9e7a77e 100644
--- a/content/docs/zh-CN/2.2.0/cookbooks-non-persistent/index.html
+++ b/content/docs/zh-CN/2.2.0/cookbooks-non-persistent/index.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry.html b/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry.html
index ac64ad3..8867980 100644
--- a/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry.html
+++ b/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.2.0/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.2.0/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.2.0/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.2.0/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.2.0/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry/index.html b/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry/index.html
index ac64ad3..8867980 100644
--- a/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry/index.html
+++ b/content/docs/zh-CN/2.2.0/cookbooks-retention-expiry/index.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.2.0/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.2.0/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.0/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.2.0/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.2.0/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.2.0/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.0/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.0/functions-guarantees.html b/content/docs/zh-CN/2.2.0/functions-guarantees.html
index b6ee219..8ba0cc2 100644
--- a/content/docs/zh-CN/2.2.0/functions-guarantees.html
+++ b/content/docs/zh-CN/2.2.0/functions-guarantees.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.2.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.2.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.2.0/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.2.0/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.2.0/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.0/functions-guarantees/index.html b/content/docs/zh-CN/2.2.0/functions-guarantees/index.html
index b6ee219..8ba0cc2 100644
--- a/content/docs/zh-CN/2.2.0/functions-guarantees/index.html
+++ b/content/docs/zh-CN/2.2.0/functions-guarantees/index.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.2.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.2.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.2.0/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.2.0/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.2.0/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.2.0/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.0/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.0/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.1/cookbooks-non-persistent.html b/content/docs/zh-CN/2.2.1/cookbooks-non-persistent.html
index 59701e3..94f2d39 100644
--- a/content/docs/zh-CN/2.2.1/cookbooks-non-persistent.html
+++ b/content/docs/zh-CN/2.2.1/cookbooks-non-persistent.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.2.1/cookbooks-non-persistent/index.html b/content/docs/zh-CN/2.2.1/cookbooks-non-persistent/index.html
index 59701e3..94f2d39 100644
--- a/content/docs/zh-CN/2.2.1/cookbooks-non-persistent/index.html
+++ b/content/docs/zh-CN/2.2.1/cookbooks-non-persistent/index.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry.html b/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry.html
index d64d594..6e803a5 100644
--- a/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry.html
+++ b/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.2.1/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.2.1/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.2.1/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.2.1/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.2.1/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry/index.html b/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry/index.html
index d64d594..6e803a5 100644
--- a/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry/index.html
+++ b/content/docs/zh-CN/2.2.1/cookbooks-retention-expiry/index.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/2.2.1/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/2.2.1/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/2.2.1/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/2.2.1/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/2.2.1/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/2.2.1/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/2.2.1/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().get
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策 [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.1/functions-guarantees.html b/content/docs/zh-CN/2.2.1/functions-guarantees.html
index a46d205..c8d2158 100644
--- a/content/docs/zh-CN/2.2.1/functions-guarantees.html
+++ b/content/docs/zh-CN/2.2.1/functions-guarantees.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.2.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.2.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.2.1/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.2.1/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.2.1/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/2.2.1/functions-guarantees/index.html b/content/docs/zh-CN/2.2.1/functions-guarantees/index.html
index a46d205..c8d2158 100644
--- a/content/docs/zh-CN/2.2.1/functions-guarantees/index.html
+++ b/content/docs/zh-CN/2.2.1/functions-guarantees/index.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.2.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.2.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/2.2.1/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/2.2.1/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/2.2.1/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/2.2.1/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/2.2.1/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/2.2.1/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/cookbooks-non-persistent.html b/content/docs/zh-CN/cookbooks-non-persistent.html
index a5d0839..1d96bd9 100644
--- a/content/docs/zh-CN/cookbooks-non-persistent.html
+++ b/content/docs/zh-CN/cookbooks-non-persistent.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/cookbooks-non-persistent/index.html b/content/docs/zh-CN/cookbooks-non-persistent/index.html
index a5d0839..1d96bd9 100644
--- a/content/docs/zh-CN/cookbooks-non-persistent/index.html
+++ b/content/docs/zh-CN/cookbooks-non-persistent/index.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/cookbooks-retention-expiry.html b/content/docs/zh-CN/cookbooks-retention-expiry.html
index 3bdbbac..ae825bf 100644
--- a/content/docs/zh-CN/cookbooks-retention-expiry.html
+++ b/content/docs/zh-CN/cookbooks-retention-expiry.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,8 +183,8 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
@@ -202,7 +202,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().getNamespaceMessageTTL(namespace)
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略">设置保留策略</a [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略">设置保留策略</a [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/cookbooks-retention-expiry/index.html b/content/docs/zh-CN/cookbooks-retention-expiry/index.html
index 3bdbbac..ae825bf 100644
--- a/content/docs/zh-CN/cookbooks-retention-expiry/index.html
+++ b/content/docs/zh-CN/cookbooks-retention-expiry/index.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,8 +183,8 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
@@ -202,7 +202,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().getNamespaceMessageTTL(namespace)
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略">设置保留策略</a [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略">设置保留策略</a [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/functions-guarantees.html b/content/docs/zh-CN/functions-guarantees.html
index fc909c0..7d87bc7 100644
--- a/content/docs/zh-CN/functions-guarantees.html
+++ b/content/docs/zh-CN/functions-guarantees.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.3.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.3.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to a function</ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li><a href="#在 [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/functions-guarantees/index.html b/content/docs/zh-CN/functions-guarantees/index.html
index fc909c0..7d87bc7 100644
--- a/content/docs/zh-CN/functions-guarantees/index.html
+++ b/content/docs/zh-CN/functions-guarantees/index.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="2.3.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="2.3.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,7 +70,7 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to a function</ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li><a href="#在 [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/next/admin-api-partitioned-topics.html b/content/docs/zh-CN/next/admin-api-partitioned-topics.html
index 38e5d94..815e9cf 100644
--- a/content/docs/zh-CN/next/admin-api-partitioned-topics.html
+++ b/content/docs/zh-CN/next/admin-api-partitioned-topics.html
@@ -135,7 +135,7 @@ admin.persistentTopics().getPartitionedTopicMetadata(topicName);
<p>Decrementing the number of partitions would deleting the topic, which is not supported in Pulsar.</p>
<p>已创建的分区生产者和消费者,将自动查找新创建的分区。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>分区主题可以使用 <a href="/docs/zh-CN/next/pulsar-admin#update-partitioned-topic"><code>更新分区主题</code></a> 命令更新。</p>
+<p>分区主题可以使用 <a href="/docs/zh-CN/next/pulsar-admin#update-partitioned-topic"><code>update-partitioned-topic</code></a> 命令更新。</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin topics update-partitioned-topic \</span>
persistent://my-tenant/my-namespace/my-topic \
--partitions 8
diff --git a/content/docs/zh-CN/next/admin-api-partitioned-topics/index.html b/content/docs/zh-CN/next/admin-api-partitioned-topics/index.html
index 38e5d94..815e9cf 100644
--- a/content/docs/zh-CN/next/admin-api-partitioned-topics/index.html
+++ b/content/docs/zh-CN/next/admin-api-partitioned-topics/index.html
@@ -135,7 +135,7 @@ admin.persistentTopics().getPartitionedTopicMetadata(topicName);
<p>Decrementing the number of partitions would deleting the topic, which is not supported in Pulsar.</p>
<p>已创建的分区生产者和消费者,将自动查找新创建的分区。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>分区主题可以使用 <a href="/docs/zh-CN/next/pulsar-admin#update-partitioned-topic"><code>更新分区主题</code></a> 命令更新。</p>
+<p>分区主题可以使用 <a href="/docs/zh-CN/next/pulsar-admin#update-partitioned-topic"><code>update-partitioned-topic</code></a> 命令更新。</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin topics update-partitioned-topic \</span>
persistent://my-tenant/my-namespace/my-topic \
--partitions 8
diff --git a/content/docs/zh-CN/next/cookbooks-non-persistent.html b/content/docs/zh-CN/next/cookbooks-non-persistent.html
index 06f8e40..674c280 100644
--- a/content/docs/zh-CN/next/cookbooks-non-persistent.html
+++ b/content/docs/zh-CN/next/cookbooks-non-persistent.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/next/cookbooks-non-persistent/index.html b/content/docs/zh-CN/next/cookbooks-non-persistent/index.html
index 06f8e40..674c280 100644
--- a/content/docs/zh-CN/next/cookbooks-non-persistent/index.html
+++ b/content/docs/zh-CN/next/cookbooks-non-persistent/index.html
@@ -74,7 +74,7 @@
<ul>
<li>非持久性主题的基本<a href="#overview">概念概述</a></li>
<li>非持久性主题相关的<a href="#configuration">可配置参数</a>信息</li>
-<li>用于管理非持久性主题<a href="#cli"> CLI(命令行工具)</a>指南</li>
+<li>用于管理非持久性主题<a href="#cli"> CLI (命令行工具) 接口</a>指南</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="概述"></a><a href="#概述" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c [...]
<p>默认情况下,Pulsar会在多个<a href="#persistent-storage"> BookKeeper </a> bookies(存储节点)上持续存储<em>所有</em>未确认的消息。 因此,持久性主题上的消息数据可以在 broker 重启和订阅者故障转移之后继续存在。</p>
diff --git a/content/docs/zh-CN/next/cookbooks-retention-expiry.html b/content/docs/zh-CN/next/cookbooks-retention-expiry.html
index 8f4051e..c1cbdfa 100644
--- a/content/docs/zh-CN/next/cookbooks-retention-expiry.html
+++ b/content/docs/zh-CN/next/cookbooks-retention-expiry.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/next/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/next/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/next/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/next/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/next/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().getNamespaceMessageTTL(namespace)
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/next/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略" [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/next/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略" [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/next/cookbooks-retention-expiry/index.html b/content/docs/zh-CN/next/cookbooks-retention-expiry/index.html
index 8f4051e..c1cbdfa 100644
--- a/content/docs/zh-CN/next/cookbooks-retention-expiry/index.html
+++ b/content/docs/zh-CN/next/cookbooks-retention-expiry/index.html
@@ -94,7 +94,7 @@
<p>当设置一个大小限制,比如10GB,那么命名空间中的所有主题中的消息,<em>甚至已确认的消息</em> 都将被保留,直到达到主题的大小限制为止;如果将时间限制设置为1天,那么命名空间中所有主题的消息将保留24小时。</p>
<p>还可以设置<em>无限</em>的保留时长限制或大小限制,方法是把保留时间或大小值设置为<code>-1</code>。</p>
<h3><a class="anchor" aria-hidden="true" id="默认情况"></a><a href="#默认情况" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6 [...]
-<p>下面的两个配置参数可用于设置消息保留的<a href="/docs/zh-CN/next/reference-terminology#instance">实例</a>范围的默认值:<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
+<p>下面的两个配置参数可用于设置<a href="/docs/zh-CN/next/reference-terminology#instance">实例</a>范围的消息保留默认值:<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionTimeInMinutes"><code>defaultRetentionTimeInMinutes=0</code></a>和<a href="/docs/zh-CN/next/reference-configuration#broker-defaultRetentionSizeInMB"><code>defaultRetentionSizeInMB=0</code></a>。</p>
<p>这两个参数都在 <a href="/docs/zh-CN/next/reference-configuration#broker"> <code>broker.conf</code> </a>配置文件中。</p>
<h3><a class="anchor" aria-hidden="true" id="设置保留策略"></a><a href="#设置保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>通过指定命名空间上的大小限制<em>和</em>时间限制来为命名空间设置保留策略。</p>
@@ -155,20 +155,20 @@ admin.namespaces().setRetention(namespace, policies);
<tr><th style="text-align:left">策略</th><th style="text-align:left">触发的操作</th></tr>
</thead>
<tbody>
-<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">The broker will hold and not persist produce request payload</td></tr>
-<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">The broker will disconnect from the client by throwing an exception</td></tr>
-<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">The broker will begin discarding backlog messages</td></tr>
+<tr><td style="text-align:left"><code>producer_request_hold</code></td><td style="text-align:left">Broker 会持有生产者投递的消息,但并不会把投递的消息进行持久化存储</td></tr>
+<tr><td style="text-align:left"><code>producer_exception</code></td><td style="text-align:left">Broker 会与客户端断开连接并抛出异常</td></tr>
+<tr><td style="text-align:left"><code>consumer_backlog_eviction</code></td><td style="text-align:left">Broker 将开始丢弃backlog的消息</td></tr>
</tbody>
</table>
<blockquote>
-<h4><a class="anchor" aria-hidden="true" id="beware-the-distinction-between-retention-policy-types"></a><a href="#beware-the-distinction-between-retention-policy-types" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2. [...]
-<p>As you may have noticed, there are two definitions of the term "retention policy" in Pulsar, one that applies to persistent storage of already-acknowledged messages and one that applies to backlogs.</p>
+<h4><a class="anchor" aria-hidden="true" id="注意保留策略类型之间的区别"></a><a href="#注意保留策略类型之间的区别" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<p>您可能已经注意到,Pulsar 中关于“保留策略”的两种定义,一个适用于已确认的消息的持久存储,另一个适用于 backlogs。</p>
</blockquote>
-<p>Backlog quotas are handled at the namespace level. They can be managed via:</p>
-<h3><a class="anchor" aria-hidden="true" id="set-size-thresholds-and-backlog-retention-policies"></a><a href="#set-size-thresholds-and-backlog-retention-policies" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can set a size threshold and backlog retention policy for all of the topics in a <a href="/docs/zh-CN/next/reference-terminology#namespace">namespace</a> by specifying the namespace, a size limit, and a policy by name.</p>
+<p>Backlog quotas 在命名空间级别处理。 它们可以通过以下方式管理:</p>
+<h3><a class="anchor" aria-hidden="true" id="设置大小阈值和-backlog-保留策略"></a><a href="#设置大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1 [...]
+<p>通过指定<a href="/docs/zh-CN/next/reference-terminology#namespace">命名空间</a>的大小限制和策略,为命名空间中的所有主题设置大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-2"></a><a href="#pulsar-admin-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#namespaces"><code>set-backlog-quota</code></a> subcommand and specify a namespace, a size limit using the <code>-l</code>/<code>--limit</code> flag, and a retention policy using the <code>-p</code>/<code>--policy</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#namespaces"><code>set-backlog-quota</code></a>子命令,并使用 <code>-l</code>/<code>--limit</code> 参数指定命名空间<code>大小限制 ,以及使用 <code>-p</code>/<code>--policy</code> 参数指定保留策略。</p>
<h5><a class="anchor" aria-hidden="true" id="example-1"></a><a href="#example-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-backlog-quota my-tenant/my-ns \</span>
--limit 2G \
@@ -183,10 +183,10 @@ BacklogQuota.RetentionPolicy policy = BacklogQuota.RetentionPolicy.producer_requ
BacklogQuota quota = <span class="hljs-keyword">new</span> BacklogQuota(sizeLimit, policy);
admin.namespaces().setBacklogQuota(namespace, quota);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-backlog-threshold-and-backlog-retention-policy"></a><a href="#get-backlog-threshold-and-backlog-retention-policy" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 [...]
-<p>You can see which size threshold and backlog retention policy has been applied to a namespace.</p>
+<h3><a class="anchor" aria-hidden="true" id="获取-backlog-大小阈值和-backlog-保留策略"></a><a href="#获取-backlog-大小阈值和-backlog-保留策略" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...]
+<p>可以查看已对命名空间应用的大小阈值和 backlog 保留策略。</p>
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-3"></a><a href="#pulsar-admin-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"><code>get-backlog-quotas</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-backlog-quotas"> <code>get-backlog-quotas</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-backlog-quotas my-tenant/my-ns</span>
{
"destination_storage": {
@@ -202,9 +202,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<pre><code class="hljs css language-java">Map<BacklogQuota.BacklogQuotaType,BacklogQuota> quotas =
admin.namespaces().getBacklogQuotas(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="remove-backlog-quotas"></a><a href="#remove-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
+<h3><a class="anchor" aria-hidden="true" id="移除-backlog-quotas"></a><a href="#移除-backlog-quotas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-4"></a><a href="#pulsar-admin-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"><code>remove-backlog-quota</code></a> subcommand and specify a namespace. Here's an example:</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-remove-backlog-quota"> <code>remove-backlog-quota</code> </a>子命令并指定命名空间。 下面是一个示例:</p>
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces remove-backlog-quota my-tenant/my-ns</span>
</code></pre>
<h4><a class="anchor" aria-hidden="true" id="rest-api-4"></a><a href="#rest-api-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
@@ -213,18 +213,18 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-4"></a><a href="#java-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().removeBacklogQuota(namespace);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="clear-backlog"></a><a href="#clear-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.8 [...]
+<h3><a class="anchor" aria-hidden="true" id="清除-backlog"></a><a href="#清除-backlog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-5"></a><a href="#pulsar-admin-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> subcommand.</p>
+<p>使用 <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-clear-backlog"><code>clear-backlog</code></a> 子命令。</p>
<h5><a class="anchor" aria-hidden="true" id="example-2"></a><a href="#example-2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces clear-backlog my-tenant/my-ns</span>
</code></pre>
-<p>By default, you will be prompted to ensure that you really want to clear the backlog for the namespace. You can override the prompt using the <code>-f</code>/<code>--force</code> flag.</p>
-<h2><a class="anchor" aria-hidden="true" id="time-to-live-ttl"></a><a href="#time-to-live-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2. [...]
-<p>By default, Pulsar stores all unacknowledged messages forever. This can lead to heavy disk space usage in cases where a lot of messages are going unacknowledged. If disk space is a concern, you can set a time to live (TTL) that determines how long unacknowledged messages will be retained.</p>
-<h3><a class="anchor" aria-hidden="true" id="set-the-ttl-for-a-namespace"></a><a href="#set-the-ttl-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 1 [...]
+<p>默认情况下,系统会提示您确认确实要清除命名空间的 backlog。您可以使用<code>-f</code>/<code>——force</code>参数覆盖提示。</p>
+<h2><a class="anchor" aria-hidden="true" id="生存时间-ttl"></a><a href="#生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 [...]
+<p>默认情况下,Pulsar 会永久存储所有未确认的消息。 在大量消息未得到确认的情况下,可能会导致大量磁盘空间的使用。 如果需要考虑磁盘空间,可以设置生存时间(TTL),以确定未确认的消息将保留多长时间。</p>
+<h3><a class="anchor" aria-hidden="true" id="为名称空间设置生存时间-ttl"></a><a href="#为名称空间设置生存时间-ttl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-6"></a><a href="#pulsar-admin-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"><code>set-message-ttl</code></a> subcommand and specify a namespace and a TTL (in seconds) using the <code>-ttl</code>/<code>--messageTTL</code> flag.</p>
+<p>使用<a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-set-message-ttl"> <code>set-message-ttl</code> </a>子命令并指定命名空间和TTL(以秒为单位,使用<code>-ttl</code>/<code>--messageTTL</code>参数指定)。</p>
<h5><a class="anchor" aria-hidden="true" id="example-3"></a><a href="#example-3" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces <span class="hljs-built_in">set</span>-message-ttl my-tenant/my-ns \</span>
--messageTTL 120 # TTL of 2 minutes
@@ -235,9 +235,9 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-5"></a><a href="#java-5" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().setNamespaceMessageTTL(namespace, ttlInSeconds);
</code></pre>
-<h3><a class="anchor" aria-hidden="true" id="get-the-ttl-configuration-for-a-namespace"></a><a href="#get-the-ttl-configuration-for-a-namespace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 [...]
+<h3><a class="anchor" aria-hidden="true" id="获取命名空间的生存时间ttl-配置"></a><a href="#获取命名空间的生存时间ttl-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2- [...]
<h4><a class="anchor" aria-hidden="true" id="pulsar-admin-7"></a><a href="#pulsar-admin-7" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0- [...]
-<p>Use the <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> subcommand and specify a namespace.</p>
+<p>使用 <a href="/docs/zh-CN/next/pulsar-admin#pulsar-admin-namespaces-get-message-ttl"><code>get-message-ttl</code></a> 子命令并指定命名空间。</p>
<h5><a class="anchor" aria-hidden="true" id="example-4"></a><a href="#example-4" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.6 [...]
<pre><code class="hljs css language-shell"><span class="hljs-meta">$</span><span class="bash"> pulsar-admin namespaces get-message-ttl my-tenant/my-ns</span>
60
@@ -248,7 +248,7 @@ admin.namespaces().setBacklogQuota(namespace, quota);
<h4><a class="anchor" aria-hidden="true" id="java-6"></a><a href="#java-6" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<pre><code class="hljs css language-java">admin.namespaces().getNamespaceMessageTTL(namespace)
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/next/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略" [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/cookbooks-partitioned"><span class="arrow-prev">← </span><span>分区主题</span></a><a class="docs-next button" href="/docs/zh-CN/next/cookbooks-encryption"><span>Encryption</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#保留策略">保留策略</a><ul class="toc-headings"><li><a href="#默认情况">默认情况</a></li><li><a href="#设置保留策略" [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/next/functions-guarantees.html b/content/docs/zh-CN/next/functions-guarantees.html
index 12472a7..9745ff0 100644
--- a/content/docs/zh-CN/next/functions-guarantees.html
+++ b/content/docs/zh-CN/next/functions-guarantees.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,10 +70,10 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
-<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
+<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明</th></tr>
</thead>
<tbody>
<tr><td style="text-align:left"><strong>At-most-once</strong> delivery</td><td style="text-align:left">发送给函数的每个消息最多会被处理一次</td></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/next/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/next/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/next/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/next/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/next/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to a [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/next/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li>< [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/docs/zh-CN/next/functions-guarantees/index.html b/content/docs/zh-CN/next/functions-guarantees/index.html
index 12472a7..9745ff0 100644
--- a/content/docs/zh-CN/next/functions-guarantees/index.html
+++ b/content/docs/zh-CN/next/functions-guarantees/index.html
@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
-"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Processing guarantees · Apache Pulsar</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
+"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Processing guarantees · Apache Pulsar"/><meta property="og:type" content="website"/><meta property="og:url" content="https://pulsar.incubator.apache.org/"/><meta property="og:description" content="<p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://pulsar.incubator.apache.org/img/pulsar.svg"/><link rel="shortcut icon" href="/img/pulsar.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://pulsar.incubator.apache.org/blog/atom.x [...]
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -70,10 +70,10 @@
};
}
});
- </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions provides three different messaging semantics that you can apply to any function:</p>
+ </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/apache-pulsar/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Processing guarantees</h1></header><article><div><span><p>Pulsar Functions 提供三种不同的信息语义,可以应用于任何函数中:</p>
<table>
<thead>
-<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明:</th></tr>
+<tr><th style="text-align:left">Delivery semantics</th><th style="text-align:left">说明</th></tr>
</thead>
<tbody>
<tr><td style="text-align:left"><strong>At-most-once</strong> delivery</td><td style="text-align:left">发送给函数的每个消息最多会被处理一次</td></tr>
@@ -81,28 +81,28 @@
<tr><td style="text-align:left"><strong>Effectively-once</strong> delivery</td><td style="text-align:left">发送函数的每条消息没精确的处理一次</td></tr>
</tbody>
</table>
-<h2><a class="anchor" aria-hidden="true" id="applying-processing-guarantees-to-a-function"></a><a href="#applying-processing-guarantees-to-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v [...]
-<p>You can set the processing guarantees for a Pulsar Function when you create the Function. This <a href="/docs/zh-CN/next/pulsar-admin#create-1"><code>pulsar-function create</code></a> command, for example, would apply effectively-once guarantees to the Function:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中应用过程保证-processing-guarantees"></a><a href="#在函数中应用过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>创建函数时,您可以为 Pulsar Function 设置过程保证。 例如, <a href="/docs/zh-CN/next/pulsar-admin#create-1"><code>pulsar-function create</code></a> 这一命令将对函数应用 effectively-once 保证,即发送给函数的每条消息均被精确处理一次:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> create \
--processing-guarantees EFFECTIVELY_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-<p>The available options are:</p>
+<p>可用选项包括:</p>
<ul>
<li><code>ATMOST_ONCE</code></li>
<li><code>ATLEAST_ONCE</code></li>
<li><code>EFFECTIVELY_ONCE</code></li>
</ul>
<blockquote>
-<p>By default, Pulsar Functions provide at-most-once delivery guarantees. So if you create a function without supplying a value for the <code>--processingGuarantees</code> flag, then the function will provide at-most-once guarantees.</p>
+<p>默认情况下,Pulsar Functions 提供 at-most-once 保证,即发送给函数的每个消息最多会被处理一次。 因此,如果创建函数时不为<code>--processingGuarantees</code>设置标志值,那么该函数将应用 at-most-once 保证。</p>
</blockquote>
-<h2><a class="anchor" aria-hidden="true" id="updating-the-processing-guarantees-of-a-function"></a><a href="#updating-the-processing-guarantees-of-a-function" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9z [...]
-<p>You can change the processing guarantees applied to a function once it's already been created using the <a href="/docs/zh-CN/next/pulsar-admin#update-1"><code>update</code></a> command. Here's an example:</p>
+<h2><a class="anchor" aria-hidden="true" id="在函数中更新过程保证-processing-guarantees"></a><a href="#在函数中更新过程保证-processing-guarantees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13. [...]
+<p>函数创建后,可使用<a href="/docs/zh-CN/next/pulsar-admin#update-1"><code>update</code></a>命令更改应用于函数的过程保证。示例如下:</p>
<pre><code class="hljs css language-bash">$ bin/pulsar-admin <span class="hljs-built_in">functions</span> update \
--processing-guarantees ATMOST_ONCE \
<span class="hljs-comment"># Other function configs</span>
</code></pre>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/next/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#applying-processing-guarantees-to-a-function">Applying processing guarantees to a [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/next/functions-deploying"><span class="arrow-prev">← </span><span>Deploying functions</span></a><a class="docs-next button" href="/docs/zh-CN/next/functions-state"><span>State Storage</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#在函数中应用过程保证-processing-guarantees">在函数中应用过程保证 (processing guarantees)</a></li><li>< [...]
const community = document.querySelector("a[href='#community']").parentNode;
const communityMenu =
'<li>' +
diff --git a/content/swagger/swagger.json b/content/swagger/swagger.json
index a3ea9d8..3a22aad 100644
--- a/content/swagger/swagger.json
+++ b/content/swagger/swagger.json
@@ -7096,12 +7096,17 @@
"type" : "number",
"format" : "double"
},
- "cpu" : {
- "$ref" : "#/definitions/ResourceUsage"
+ "overLoaded" : {
+ "type" : "boolean"
},
- "msgThroughputIn" : {
- "type" : "number",
- "format" : "double"
+ "underLoaded" : {
+ "type" : "boolean"
+ },
+ "loadReportType" : {
+ "type" : "string"
+ },
+ "bandwidthIn" : {
+ "$ref" : "#/definitions/ResourceUsage"
},
"bandwidthOut" : {
"$ref" : "#/definitions/ResourceUsage"
@@ -7109,9 +7114,8 @@
"memory" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "msgThroughputOut" : {
- "type" : "number",
- "format" : "double"
+ "cpu" : {
+ "$ref" : "#/definitions/ResourceUsage"
},
"directMemory" : {
"$ref" : "#/definitions/ResourceUsage"
@@ -7120,17 +7124,13 @@
"type" : "integer",
"format" : "int64"
},
- "bandwidthIn" : {
- "$ref" : "#/definitions/ResourceUsage"
- },
- "underLoaded" : {
- "type" : "boolean"
- },
- "overLoaded" : {
- "type" : "boolean"
+ "msgThroughputIn" : {
+ "type" : "number",
+ "format" : "double"
},
- "loadReportType" : {
- "type" : "string"
+ "msgThroughputOut" : {
+ "type" : "number",
+ "format" : "double"
}
}
},