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 2df3a17  Updated site at revision 6c13f18
2df3a17 is described below

commit 2df3a1747b2b447424e6feeb762ae53c3d54af7b
Author: jenkins <[email protected]>
AuthorDate: Fri Jun 21 09:07:15 2019 +0000

    Updated site at revision 6c13f18
---
 content/css/main.css                               |   2 +-
 content/docs/en/next/client-libraries-go.html      |   2 +-
 .../docs/en/next/client-libraries-go/index.html    |   2 +-
 content/docs/en/next/client-libraries-java.html    | 137 ++++++++++++++++++++-
 .../docs/en/next/client-libraries-java/index.html  | 137 ++++++++++++++++++++-
 content/docs/fr/next/client-libraries-go.html      |   2 +-
 .../docs/fr/next/client-libraries-go/index.html    |   2 +-
 content/docs/fr/next/client-libraries-java.html    | 137 ++++++++++++++++++++-
 .../docs/fr/next/client-libraries-java/index.html  | 137 ++++++++++++++++++++-
 content/docs/ja/next/client-libraries-go.html      |   2 +-
 .../docs/ja/next/client-libraries-go/index.html    |   2 +-
 content/docs/ja/next/client-libraries-java.html    | 137 ++++++++++++++++++++-
 .../docs/ja/next/client-libraries-java/index.html  | 137 ++++++++++++++++++++-
 content/docs/zh-CN/next/client-libraries-go.html   |   2 +-
 .../docs/zh-CN/next/client-libraries-go/index.html |   2 +-
 content/docs/zh-CN/next/client-libraries-java.html | 137 ++++++++++++++++++++-
 .../zh-CN/next/client-libraries-java/index.html    | 137 ++++++++++++++++++++-
 content/swagger/2.4.0-SNAPSHOT/swagger.json        |  26 ++--
 .../swagger/2.4.0-SNAPSHOT/swaggerfunctions.json   |  54 ++++----
 19 files changed, 1140 insertions(+), 54 deletions(-)

diff --git a/content/css/main.css b/content/css/main.css
index ba6d6b9..656f0b5 100644
--- a/content/css/main.css
+++ b/content/css/main.css
@@ -1 +1 @@
-a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}b
 [...]
\ No newline at end of file
+a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}b
 [...]
\ No newline at end of file
diff --git a/content/docs/en/next/client-libraries-go.html 
b/content/docs/en/next/client-libraries-go.html
index 33f97c1..528efec 100644
--- a/content/docs/en/next/client-libraries-go.html
+++ b/content/docs/en/next/client-libraries-go.html
@@ -235,7 +235,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/en/next/client-libraries-go/index.html 
b/content/docs/en/next/client-libraries-go/index.html
index 33f97c1..528efec 100644
--- a/content/docs/en/next/client-libraries-go/index.html
+++ b/content/docs/en/next/client-libraries-go/index.html
@@ -235,7 +235,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/en/next/client-libraries-java.html 
b/content/docs/en/next/client-libraries-java.html
index 9731ef1..9f21284 100644
--- a/content/docs/en/next/client-libraries-java.html
+++ b/content/docs/en/next/client-libraries-java.html
@@ -317,6 +317,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<h3><a class="anchor" aria-hidden="true" id="subscription-modes"></a><a 
href="#subscription-modes" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22- [...]
+<p>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover"></a><a href="#failover" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+  
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-1"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-2"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-3"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-1"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-2"</span>)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-3"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-1"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-2"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-1"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-2"</span>)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared"></a><a href="#shared" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+  
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-1"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-3"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-2"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-1"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-1"</span>)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-2"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-1"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-3"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-2"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-2"</span>)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+  
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-1"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-2"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-3"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-1"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-2"</span>)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-1"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-2"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-3"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-1"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-2"</span>)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-interface"></a><a 
href="#reader-interface" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.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>With the <a href="/docs/en/next/concepts-clients#reader-interface">reader 
interface</a>, Pulsar clients can &quot;manually position&quot; themselves 
within a topic, reading all messages from a specified message onward. The 
Pulsar API for Java enables you to create  <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  objects by specifying a topic, a <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -450,7 +585,7 @@ PulsarClient client = PulsarClient.builder()
 <li><code>data:application/x-pem-file;base64,&lt;base64-encoded 
value&gt;</code></li>
 </ul>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/en/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/en/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/en/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/en/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/en/next/client-libraries-java/index.html 
b/content/docs/en/next/client-libraries-java/index.html
index 9731ef1..9f21284 100644
--- a/content/docs/en/next/client-libraries-java/index.html
+++ b/content/docs/en/next/client-libraries-java/index.html
@@ -317,6 +317,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<h3><a class="anchor" aria-hidden="true" id="subscription-modes"></a><a 
href="#subscription-modes" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22- [...]
+<p>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover"></a><a href="#failover" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+  
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-1"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-2"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-3"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-1"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-2"</span>)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-3"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-1"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-2"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-1"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-2"</span>)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared"></a><a href="#shared" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+  
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-1"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-3"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-2"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-1"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-1"</span>)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-2"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-1"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-3"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-2"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-2"</span>)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+  
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-1"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-2"</span>)
+(<span class="hljs-string">"key-1"</span>, <span 
class="hljs-string">"message-1-3"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-1"</span>)
+(<span class="hljs-string">"key-3"</span>, <span 
class="hljs-string">"message-3-2"</span>)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-1"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-2"</span>)
+(<span class="hljs-string">"key-2"</span>, <span 
class="hljs-string">"message-2-3"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-1"</span>)
+(<span class="hljs-string">"key-4"</span>, <span 
class="hljs-string">"message-4-2"</span>)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-interface"></a><a 
href="#reader-interface" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.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>With the <a href="/docs/en/next/concepts-clients#reader-interface">reader 
interface</a>, Pulsar clients can &quot;manually position&quot; themselves 
within a topic, reading all messages from a specified message onward. The 
Pulsar API for Java enables you to create  <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  objects by specifying a topic, a <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -450,7 +585,7 @@ PulsarClient client = PulsarClient.builder()
 <li><code>data:application/x-pem-file;base64,&lt;base64-encoded 
value&gt;</code></li>
 </ul>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/en/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/en/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/en/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/en/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/fr/next/client-libraries-go.html 
b/content/docs/fr/next/client-libraries-go.html
index bb8273e..a723752 100644
--- a/content/docs/fr/next/client-libraries-go.html
+++ b/content/docs/fr/next/client-libraries-go.html
@@ -233,7 +233,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/fr/next/client-libraries-go/index.html 
b/content/docs/fr/next/client-libraries-go/index.html
index bb8273e..a723752 100644
--- a/content/docs/fr/next/client-libraries-go/index.html
+++ b/content/docs/fr/next/client-libraries-go/index.html
@@ -233,7 +233,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/fr/next/client-libraries-java.html 
b/content/docs/fr/next/client-libraries-java.html
index 291cfd8..ffab1a6 100644
--- a/content/docs/fr/next/client-libraries-java.html
+++ b/content/docs/fr/next/client-libraries-java.html
@@ -317,6 +317,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<h3><a class="anchor" aria-hidden="true" id="subscription-modes"></a><a 
href="#subscription-modes" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22- [...]
+<p>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover"></a><a href="#failover" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared"></a><a href="#shared" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-interface"></a><a 
href="#reader-interface" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.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>Avec l'interface <a href="concepts-clients.md#reader-interface">reader</a>, 
les clients Pulsar peuvent se positionner manuellement dans un topic, en lisant 
tous les messages à partir d'un message spécifié. L'API Pulsar pour Java vous 
permet de créer des objets <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  en spécifiant un topic, un <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -445,7 +580,7 @@ PulsarClient client = PulsarClient.builder()
 <h4><a class="anchor" aria-hidden="true" 
id="formats-de-modele-supportes"></a><a href="#formats-de-modele-supportes" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 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>Le paramètre <code>privateKey</code> supporte les trois formats de schéma 
suivants : * <code>fichier:///chemin/vers/fichier</code>* * 
<code>fichier:/chemin/vers/fichier</code>* * 
<code>data:application/x-pem-file;base64,&lt;base64-encoded value&gt;</code></p>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/fr/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/fr/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/fr/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/fr/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/fr/next/client-libraries-java/index.html 
b/content/docs/fr/next/client-libraries-java/index.html
index 291cfd8..ffab1a6 100644
--- a/content/docs/fr/next/client-libraries-java/index.html
+++ b/content/docs/fr/next/client-libraries-java/index.html
@@ -317,6 +317,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<h3><a class="anchor" aria-hidden="true" id="subscription-modes"></a><a 
href="#subscription-modes" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22- [...]
+<p>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover"></a><a href="#failover" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared"></a><a href="#shared" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-interface"></a><a 
href="#reader-interface" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.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>Avec l'interface <a href="concepts-clients.md#reader-interface">reader</a>, 
les clients Pulsar peuvent se positionner manuellement dans un topic, en lisant 
tous les messages à partir d'un message spécifié. L'API Pulsar pour Java vous 
permet de créer des objets <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  en spécifiant un topic, un <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -445,7 +580,7 @@ PulsarClient client = PulsarClient.builder()
 <h4><a class="anchor" aria-hidden="true" 
id="formats-de-modele-supportes"></a><a href="#formats-de-modele-supportes" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 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>Le paramètre <code>privateKey</code> supporte les trois formats de schéma 
suivants : * <code>fichier:///chemin/vers/fichier</code>* * 
<code>fichier:/chemin/vers/fichier</code>* * 
<code>data:application/x-pem-file;base64,&lt;base64-encoded value&gt;</code></p>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/fr/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/fr/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/fr/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/fr/next/client-libraries-go"><span>Go</span><span 
class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul 
class="toc-headings"><li><a href="#installation">Installation</a><ul 
class="toc-headings"><li><a href="#maven">Maven</a></li><li><a href="#gr [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/ja/next/client-libraries-go.html 
b/content/docs/ja/next/client-libraries-go.html
index e7ad280..f069ce5 100644
--- a/content/docs/ja/next/client-libraries-go.html
+++ b/content/docs/ja/next/client-libraries-go.html
@@ -233,7 +233,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/ja/next/client-libraries-go/index.html 
b/content/docs/ja/next/client-libraries-go/index.html
index e7ad280..f069ce5 100644
--- a/content/docs/ja/next/client-libraries-go/index.html
+++ b/content/docs/ja/next/client-libraries-go/index.html
@@ -233,7 +233,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/ja/next/client-libraries-java.html 
b/content/docs/ja/next/client-libraries-java.html
index bee5b6e..d6241cd 100644
--- a/content/docs/ja/next/client-libraries-java.html
+++ b/content/docs/ja/next/client-libraries-java.html
@@ -318,6 +318,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<h3><a class="anchor" aria-hidden="true" id="subscription-modes"></a><a 
href="#subscription-modes" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22- [...]
+<p>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover"></a><a href="#failover" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared"></a><a href="#shared" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-interface"></a><a 
href="#reader-interface" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.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>With the <a href="concepts-clients.md#reader-interface">reader 
interface</a>, Pulsar clients can &quot;manually position&quot; themselves 
within a topic, reading all messages from a specified message onward. The 
Pulsar API for Java enables you to create <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  objects by specifying a topic, a <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -446,7 +581,7 @@ PulsarClient client = PulsarClient.builder()
 <h4><a class="anchor" aria-hidden="true" id="supported-pattern-formats"></a><a 
href="#supported-pattern-formats" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c [...]
 <p>The <code>privateKey</code> parameter supports the following three pattern 
formats: * <code>file:///path/to/file</code> * <code>file:/path/to/file</code> 
* <code>data:application/x-pem-file;base64,&lt;base64-encoded 
value&gt;</code></p>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/ja/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/ja/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a 
href="#gradle">Gradle [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/ja/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/ja/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a 
href="#gradle">Gradle [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/ja/next/client-libraries-java/index.html 
b/content/docs/ja/next/client-libraries-java/index.html
index bee5b6e..d6241cd 100644
--- a/content/docs/ja/next/client-libraries-java/index.html
+++ b/content/docs/ja/next/client-libraries-java/index.html
@@ -318,6 +318,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<h3><a class="anchor" aria-hidden="true" id="subscription-modes"></a><a 
href="#subscription-modes" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22- [...]
+<p>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover"></a><a href="#failover" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared"></a><a href="#shared" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-interface"></a><a 
href="#reader-interface" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.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>With the <a href="concepts-clients.md#reader-interface">reader 
interface</a>, Pulsar clients can &quot;manually position&quot; themselves 
within a topic, reading all messages from a specified message onward. The 
Pulsar API for Java enables you to create <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  objects by specifying a topic, a <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -446,7 +581,7 @@ PulsarClient client = PulsarClient.builder()
 <h4><a class="anchor" aria-hidden="true" id="supported-pattern-formats"></a><a 
href="#supported-pattern-formats" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c [...]
 <p>The <code>privateKey</code> parameter supports the following three pattern 
formats: * <code>file:///path/to/file</code> * <code>file:/path/to/file</code> 
* <code>data:application/x-pem-file;base64,&lt;base64-encoded 
value&gt;</code></p>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/ja/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/ja/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a 
href="#gradle">Gradle [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/ja/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/ja/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a 
href="#gradle">Gradle [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/zh-CN/next/client-libraries-go.html 
b/content/docs/zh-CN/next/client-libraries-go.html
index 427b963..6b0931d 100644
--- a/content/docs/zh-CN/next/client-libraries-go.html
+++ b/content/docs/zh-CN/next/client-libraries-go.html
@@ -233,7 +233,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/zh-CN/next/client-libraries-go/index.html 
b/content/docs/zh-CN/next/client-libraries-go/index.html
index 427b963..6b0931d 100644
--- a/content/docs/zh-CN/next/client-libraries-go/index.html
+++ b/content/docs/zh-CN/next/client-libraries-go/index.html
@@ -233,7 +233,7 @@ msg := pulsar.ProducerMessage{
         producer.SendAsync(ctx, asyncMsg, <span class="hljs-function"><span 
class="hljs-keyword">func</span><span class="hljs-params">(msg 
pulsar.ProducerMessage, err error)</span></span> {
             <span class="hljs-keyword">if</span> err != <span 
class="hljs-literal">nil</span> { log.Fatal(err) }
 
-            fmt.Printf(<span class="hljs-string">"Message %s succesfully 
published"</span>, msg.ID())
+            fmt.Printf(<span class="hljs-string">"the %s successfully 
published"</span>, <span class="hljs-keyword">string</span>(msg.Payload))
         })
     }
 }
diff --git a/content/docs/zh-CN/next/client-libraries-java.html 
b/content/docs/zh-CN/next/client-libraries-java.html
index 8cb7746..04c8975 100644
--- a/content/docs/zh-CN/next/client-libraries-java.html
+++ b/content/docs/zh-CN/next/client-libraries-java.html
@@ -318,6 +318,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<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>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover-灾备"></a><a 
href="#failover-灾备" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared-共享"></a><a 
href="#shared-共享" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-接口"></a><a 
href="#reader-接口" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
 <p>使用 <a href="concepts-clients.md#reader-interface">reader 接口</a>, 
Pulsar客户可以在主题中“手动定位”自己,从指定的消息开始向前读取所有消息。 The Pulsar API for Java enables you to 
create <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  objects by specifying a topic, a <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -446,7 +581,7 @@ PulsarClient client = PulsarClient.builder()
 <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-.83.42-1.64 1-2.09 [...]
 <p><code>privateKey</code>参数支持如下三种格式: * <code>file:///path/to/file</code> * 
<code>file:/path/to/file</code> * 
<code>data:application/x-pem-file;base64,&lt;base64-encoded value&gt;</code></p>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/zh-CN/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/zh-CN/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a href="#gradle">Gradle</ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/zh-CN/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/zh-CN/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a href="#gradle">Gradle</ [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/docs/zh-CN/next/client-libraries-java/index.html 
b/content/docs/zh-CN/next/client-libraries-java/index.html
index 8cb7746..04c8975 100644
--- a/content/docs/zh-CN/next/client-libraries-java/index.html
+++ b/content/docs/zh-CN/next/client-libraries-java/index.html
@@ -318,6 +318,141 @@ consumerBuilder
             } <span class="hljs-keyword">while</span> (<span 
class="hljs-keyword">true</span>);
         });
 </code></pre>
+<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>Pulsar has various <a 
href="concepts-messaging#subscription-modes">subscription modes</a> to match 
different scenarios. A topic can have multiple subscriptions with different 
subscription modes. However, a subscription can only have one subscription mode 
at a time.</p>
+<p>A subscription is identified with the subscription name, and a subscription 
name can specify only one subscription mode at a time. You can change the 
subscription mode, yet you have to let all existing consumers of this 
subscription offline first.</p>
+<p>Different subscription modes have different message distribution modes. 
This section describes the differences of subscription modes and how to use 
them.</p>
+<p>In order to better describe their differences, assuming you have a topic 
named &quot;my-topic&quot;, and the producer has published 10 messages.</p>
+<pre><code class="hljs css language-java">Producer&lt;String&gt; producer = 
client.newProducer(Schema.STRING)
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .enableBatch(<span class="hljs-keyword">false</span>)
+        .create();
+<span class="hljs-comment">// 3 messages with "key-1", 3 messages with 
"key-2", 2 messages with "key-3" and 2 messages with "key-4"</span>
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-1"</span>).value(<span 
class="hljs-string">"message-1-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-2"</span>).value(<span 
class="hljs-string">"message-2-3"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-3"</span>).value(<span 
class="hljs-string">"message-3-2"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-1"</span>).send();
+producer.newMessage().key(<span 
class="hljs-string">"key-4"</span>).value(<span 
class="hljs-string">"message-4-2"</span>).send();
+</code></pre>
+<h4><a class="anchor" aria-hidden="true" id="exclusive"></a><a 
href="#exclusive" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create a new consumer and subscribe with the <code>Exclusive</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Exclusive)
+        .subscribe()
+</code></pre>
+<p>Only the first consumer is allowed to the subscription, other consumers 
receive an error. The first consumer receives all 10 messages, and the 
consuming order is the same as the producing order.</p>
+<blockquote>
+<p>Note:</p>
+<p>If topic is a partitioned topic, the first consumer subscribes to all 
partitioned topics, other consumers are not assigned with partitions and 
receive an error.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="failover-灾备"></a><a 
href="#failover-灾备" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>Create new consumers and subscribe with the<code>Failover</code> 
subscription mode.</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Failover)
+        .subscribe()
+<span class="hljs-comment">//conumser1 is the active consumer, consumer2 is 
the standby consumer.</span>
+<span class="hljs-comment">//consumer1 receives 5 messages and then crashes, 
consumer2 takes over as an  active consumer.</span>
+
+
+</code></pre>
+<p>Multiple consumers can attach to the same subscription, yet only the first 
consumer is active, and others are standby. When the active consumer is 
disconnected, messages will be dispatched to one of standby consumers, and the 
standby consumer becomes active consumer.</p>
+<p>If the first active consumer receives 5 messages and is disconnected, the 
standby consumer becomes active consumer. Consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+</code></pre>
+<p>consumer2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If a topic is a partitioned topic, each partition only has one active 
consumer, messages of one partition only distributed to one consumer, messages 
of multiple partitions are distributed to multiple consumers.</p>
+</blockquote>
+<h4><a class="anchor" aria-hidden="true" id="shared-共享"></a><a 
href="#shared-共享" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
+<p>Create new consumers and subscribe with <code>Shared</code> subscription 
mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer 2 is active 
consumers.</span>
+</code></pre>
+<p>In shared subscription mode, multiple consumers can attach to the same 
subscription and message are delivered in a round robin distribution across 
consumers.</p>
+<p>If a broker dispatches only one message at a time, consumer1 will 
receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<p><code>Shared</code> subscription is different from <code>Exclusive</code> 
and <code>Failover</code> subscription modes. <code>Shared</code> subscription 
has better flexibility, but cannot provide order guarantee.</p>
+<h4><a class="anchor" aria-hidden="true" id="key_shared"></a><a 
href="#key_shared" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 
[...]
+<p>This is a new subscription mode since 2.4.0 release, create new consumers 
and subscribe with <code>Key_Shared</code> subscription mode:</p>
+<pre><code class="hljs css language-java">Consumer consumer1 = 
client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+
+Consumer consumer2 = client.newConsumer()
+        .topic(<span class="hljs-string">"my-topic"</span>)
+        .subscriptionName(<span class="hljs-string">"my-subscription"</span>)
+        .subscriptionType(SubscriptionType.Key_Shared)
+        .subscribe()
+<span class="hljs-comment">//Both consumer1 and consumer2 are active 
consumers.</span>
+</code></pre>
+<p><code>Key_Shared</code> subscription is like <code>Shared</code> 
subscription, all consumers can attach to the same subscription. But it is 
different from <code>Key_Shared</code> subscription, messages with the same key 
are delivered to only one consumer in order. The possible distribution of 
messages between different consumers(by default we do not know in advance which 
keys will be assigned to a consumer, but a key will only be assigned to a 
consumer at the same time. ) .</p>
+<p>consumer1 will receive:</p>
+<pre><code class="hljs">(&quot;key-1&quot;, &quot;message-1-1&quot;)
+(&quot;key-1&quot;, &quot;message-1-2&quot;)
+(&quot;key-1&quot;, &quot;message-1-3&quot;)
+(&quot;key-3&quot;, &quot;message-3-1&quot;)
+(&quot;key-3&quot;, &quot;message-3-2&quot;)
+</code></pre>
+<p>consumer 2 will receive:</p>
+<pre><code class="hljs">(&quot;key-2&quot;, &quot;message-2-1&quot;)
+(&quot;key-2&quot;, &quot;message-2-2&quot;)
+(&quot;key-2&quot;, &quot;message-2-3&quot;)
+(&quot;key-4&quot;, &quot;message-4-1&quot;)
+(&quot;key-4&quot;, &quot;message-4-2&quot;)
+</code></pre>
+<blockquote>
+<p>Note:</p>
+<p>If the message key is not specified, messages without key will be 
dispatched to one consumer in order by default.</p>
+</blockquote>
 <h2><a class="anchor" aria-hidden="true" id="reader-接口"></a><a 
href="#reader-接口" aria-hidden="true" class="hash-link"><svg 
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 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 [...]
 <p>使用 <a href="concepts-clients.md#reader-interface">reader 接口</a>, 
Pulsar客户可以在主题中“手动定位”自己,从指定的消息开始向前读取所有消息。 The Pulsar API for Java enables you to 
create <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/Reader";>Reader</a>
  objects by specifying a topic, a <a 
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/MessageId";>MessageId</a>
@@ -446,7 +581,7 @@ PulsarClient client = PulsarClient.builder()
 <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-.83.42-1.64 1-2.09 [...]
 <p><code>privateKey</code>参数支持如下三种格式: * <code>file:///path/to/file</code> * 
<code>file:/path/to/file</code> * 
<code>data:application/x-pem-file;base64,&lt;base64-encoded value&gt;</code></p>
 </blockquote>
-</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/zh-CN/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/zh-CN/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a href="#gradle">Gradle</ [...]
+</span></div></article></div><div class="docs-prevnext"><a class="docs-prev 
button" href="/docs/zh-CN/next/security-extending"><span class="arrow-prev">← 
</span><span>Extending</span></a><a class="docs-next button" 
href="/docs/zh-CN/next/client-libraries-go"><span>Go</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="#maven">Maven</a></li><li><a href="#gradle">Gradle</ [...]
       const community = 
document.querySelector("a[href='#community']").parentNode;
       const communityMenu =
         '<li>' +
diff --git a/content/swagger/2.4.0-SNAPSHOT/swagger.json 
b/content/swagger/2.4.0-SNAPSHOT/swagger.json
index eb1f74d..c266f91 100644
--- a/content/swagger/2.4.0-SNAPSHOT/swagger.json
+++ b/content/swagger/2.4.0-SNAPSHOT/swagger.json
@@ -7682,8 +7682,14 @@
           "404" : {
             "description" : "Tenant or Namespace or Topic doesn't exist"
           },
+          "409" : {
+            "description" : "Incompatible schema"
+          },
           "412" : {
             "description" : "Failed to find the ownership for the topic"
+          },
+          "422" : {
+            "description" : "Invalid schema data"
           }
         }
       },
@@ -8522,6 +8528,9 @@
           "type" : "number",
           "format" : "double"
         },
+        "underLoaded" : {
+          "type" : "boolean"
+        },
         "overLoaded" : {
           "type" : "boolean"
         },
@@ -8531,16 +8540,16 @@
         "cpu" : {
           "$ref" : "#/definitions/ResourceUsage"
         },
-        "bandwidthIn" : {
+        "memory" : {
           "$ref" : "#/definitions/ResourceUsage"
         },
-        "bandwidthOut" : {
+        "directMemory" : {
           "$ref" : "#/definitions/ResourceUsage"
         },
-        "memory" : {
+        "bandwidthIn" : {
           "$ref" : "#/definitions/ResourceUsage"
         },
-        "directMemory" : {
+        "bandwidthOut" : {
           "$ref" : "#/definitions/ResourceUsage"
         },
         "lastUpdate" : {
@@ -8554,9 +8563,6 @@
         "msgThroughputOut" : {
           "type" : "number",
           "format" : "double"
-        },
-        "underLoaded" : {
-          "type" : "boolean"
         }
       }
     },
@@ -9494,11 +9500,11 @@
     "ResourceUnit" : {
       "type" : "object",
       "properties" : {
-        "resourceId" : {
-          "type" : "string"
-        },
         "availableResource" : {
           "$ref" : "#/definitions/ResourceDescription"
+        },
+        "resourceId" : {
+          "type" : "string"
         }
       }
     },
diff --git a/content/swagger/2.4.0-SNAPSHOT/swaggerfunctions.json 
b/content/swagger/2.4.0-SNAPSHOT/swaggerfunctions.json
index b8b88e1..38c6735 100644
--- a/content/swagger/2.4.0-SNAPSHOT/swaggerfunctions.json
+++ b/content/swagger/2.4.0-SNAPSHOT/swaggerfunctions.json
@@ -1348,33 +1348,6 @@
     "Message" : {
       "type" : "object",
       "properties" : {
-        "replicated" : {
-          "type" : "boolean"
-        },
-        "publishTime" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "eventTime" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "topicName" : {
-          "type" : "string"
-        },
-        "replicatedFrom" : {
-          "type" : "string"
-        },
-        "producerName" : {
-          "type" : "string"
-        },
-        "keyBytes" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string",
-            "format" : "byte"
-          }
-        },
         "orderingKey" : {
           "type" : "array",
           "items" : {
@@ -1396,6 +1369,20 @@
             "format" : "byte"
           }
         },
+        "replicated" : {
+          "type" : "boolean"
+        },
+        "publishTime" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "eventTime" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "topicName" : {
+          "type" : "string"
+        },
         "messageId" : {
           "$ref" : "#/definitions/MessageId"
         },
@@ -1403,6 +1390,19 @@
           "type" : "integer",
           "format" : "int64"
         },
+        "replicatedFrom" : {
+          "type" : "string"
+        },
+        "keyBytes" : {
+          "type" : "array",
+          "items" : {
+            "type" : "string",
+            "format" : "byte"
+          }
+        },
+        "producerName" : {
+          "type" : "string"
+        },
         "data" : {
           "type" : "array",
           "items" : {

Reply via email to