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 f2ec37f Updated site at revision 44dcc5b
f2ec37f is described below
commit f2ec37f96d3c9f50347d088e6f89e53eab900f29
Author: jenkins <[email protected]>
AuthorDate: Sat Sep 7 09:25:22 2019 +0000
Updated site at revision 44dcc5b
---
content/docs/en/next/adaptors-kafka.html | 1 +
content/docs/en/next/adaptors-kafka/index.html | 1 +
content/docs/en/next/client-libraries-java.html | 40 ++++++++--
.../docs/en/next/client-libraries-java/index.html | 40 ++++++++--
content/docs/fr/next/adaptors-kafka.html | 1 +
content/docs/fr/next/adaptors-kafka/index.html | 1 +
content/docs/fr/next/client-libraries-java.html | 91 ++++++++++++++++++++--
.../docs/fr/next/client-libraries-java/index.html | 91 ++++++++++++++++++++--
content/docs/ja/next/adaptors-kafka.html | 1 +
content/docs/ja/next/adaptors-kafka/index.html | 1 +
content/docs/ja/next/client-libraries-java.html | 91 ++++++++++++++++++++--
.../docs/ja/next/client-libraries-java/index.html | 91 ++++++++++++++++++++--
content/docs/zh-CN/next/adaptors-kafka.html | 1 +
content/docs/zh-CN/next/adaptors-kafka/index.html | 1 +
content/docs/zh-CN/next/client-libraries-java.html | 91 ++++++++++++++++++++--
.../zh-CN/next/client-libraries-java/index.html | 91 ++++++++++++++++++++--
content/swagger/2.5.0-SNAPSHOT/swagger.json | 32 ++++----
.../swagger/2.5.0-SNAPSHOT/swaggerfunctions.json | 36 ++++-----
content/swagger/master/swagger.json | 32 ++++----
content/swagger/master/swaggerfunctions.json | 36 ++++-----
20 files changed, 650 insertions(+), 120 deletions(-)
diff --git a/content/docs/en/next/adaptors-kafka.html
b/content/docs/en/next/adaptors-kafka.html
index 3d479f1..13bf7b4 100644
--- a/content/docs/en/next/adaptors-kafka.html
+++ b/content/docs/en/next/adaptors-kafka.html
@@ -290,6 +290,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">The
maximum number of concurrent topic lookups.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">The
threshold of errors to forcefully close a connection.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="pulsar-producer-properties"></a><a href="#pulsar-producer-properties"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H [...]
diff --git a/content/docs/en/next/adaptors-kafka/index.html
b/content/docs/en/next/adaptors-kafka/index.html
index 3d479f1..13bf7b4 100644
--- a/content/docs/en/next/adaptors-kafka/index.html
+++ b/content/docs/en/next/adaptors-kafka/index.html
@@ -290,6 +290,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">The
maximum number of concurrent topic lookups.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">The
threshold of errors to forcefully close a connection.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="pulsar-producer-properties"></a><a href="#pulsar-producer-properties"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H [...]
diff --git a/content/docs/en/next/client-libraries-java.html
b/content/docs/en/next/client-libraries-java.html
index 7ae34b5..9a94f82 100644
--- a/content/docs/en/next/client-libraries-java.html
+++ b/content/docs/en/next/client-libraries-java.html
@@ -141,14 +141,14 @@ dependencies {
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
<table>
<thead>
-<tr><th>Type</th><th>Name</th><th>Description</th><th>Default</th></tr>
+<tr><th>Type</th><th>Name</th><th><div
style="width:260px">Description</div></th><th>Default</th></tr>
</thead>
<tbody>
<tr><td>String</td><td><code>serviceUrl</code></td><td>Service URL provider
for Pulsar service</td><td>None</td></tr>
<tr><td>String</td><td><code>authPluginClassName</code></td><td>Name of the
authentication plugin</td><td>None</td></tr>
-<tr><td>String</td><td><code>authParams</code></td><td>String represents
parameters for the authentication plugin <br><strong>Example</strong><br>
key1:val1,key2:val2</td><td>None</td></tr>
+<tr><td>String</td><td><code>authParams</code></td><td>String represents
parameters for the authentication plugin
<br/><br/><strong>Example</strong><br/>
key1:val1,key2:val2</td><td>None</td></tr>
<tr><td>long</td><td><code>operationTimeoutMs</code></td><td>Operation
timeout</td><td>30000</td></tr>
-<tr><td>long</td><td><code>statsIntervalSeconds</code></td><td>Interval
between each stat info<br>Stats is activated with positive
<code>statsInterval</code><br><code>statsIntervalSeconds</code> should be set
to 1 second at least</td><td>60</td></tr>
+<tr><td>long</td><td><code>statsIntervalSeconds</code></td><td>Interval
between each stat info<br/><br/>Stats is activated with positive
<code>statsInterval</code><br/><br/><code>statsIntervalSeconds</code> should be
set to 1 second at least</td><td>60</td></tr>
<tr><td>int</td><td><code>numIoThreads</code></td><td>Number of threads used
for handling connections to brokers</td><td>1</td></tr>
<tr><td>int</td><td><code>numListenerThreads</code></td><td>Number of threads
used for handling message listeners</td><td>1</td></tr>
<tr><td>boolean</td><td><code>useTcpNoDelay</code></td><td>Whether to use TCP
no-delay flag on the connection to disable Nagle
algorithm</td><td>true</td></tr>
@@ -160,7 +160,7 @@ dependencies {
<tr><td>int</td><td><code>maxLookupRequest</code></td><td>Maximum number of
lookup requests allowed on each broker connection to prevent overload on
broker</td><td>50000</td></tr>
<tr><td>int</td><td><code>maxNumberOfRejectedRequestPerConnection</code></td><td>Maximum
number of rejected requests of a broker in a certain time frame (30 seconds)
after the current connection is closed and the client creates a new connection
to connect to a different broker</td><td>50</td></tr>
<tr><td>int</td><td><code>keepAliveIntervalSeconds</code></td><td>Seconds of
keeping alive interval for each client broker connection</td><td>30</td></tr>
-<tr><td>int</td><td><code>connectionTimeoutMs</code></td><td>Duration of
waiting for a connection to a broker to be established <br>If the duration
passes without a response from a broker, the connection attempt is
dropped</td><td>10000</td></tr>
+<tr><td>int</td><td><code>connectionTimeoutMs</code></td><td>Duration of
waiting for a connection to a broker to be established <br/><br/>If the
duration passes without a response from a broker, the connection attempt is
dropped</td><td>10000</td></tr>
<tr><td>int</td><td><code>requestTimeoutMs</code></td><td>Maximum duration for
completing a request</td><td>60000</td></tr>
<tr><td>int</td><td><code>defaultBackoffIntervalNanos</code></td><td>Default
duration for a backoff
interval</td><td>TimeUnit.MILLISECONDS.toNanos(100);</td></tr>
<tr><td>long</td><td><code>maxBackoffIntervalNanos</code></td><td>Maximum
duration for a backoff interval</td><td>TimeUnit.SECONDS.toNanos(30)</td></tr>
@@ -266,7 +266,37 @@ to have the message redelivered at a later point in
time.</p>
}
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="configuring-consumers"></a><a
href="#configuring-consumers" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
-<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration. To use a non-default configuration, there's a variety of
configurable parameters that you can set. For a full listing, see the Javadoc
for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
+<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration.</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<table>
+<thead>
+<tr><th>Type</th><th>Name</th><th><div
style="width:300px">Description</div></th><th>Default</th></tr>
+</thead>
+<tbody>
+<tr><td>Set<String></td><td><code>topicNames</code></td><td>Topic
name</td><td>Sets.newTreeSet()</td></tr>
+<tr><td>Pattern</td><td><code>topicsPattern</code></td><td>Topic
pattern</td><td>None</td></tr>
+<tr><td>String</td><td><code>subscriptionName</code></td><td>Subscription
name</td><td>None</td></tr>
+<tr><td>SubscriptionType</td><td><code>subscriptionType</code></td><td>Subscription
type <br/><br/>There are three subscription
types:<li>Exclusive</li><li>Failover</li><li>Shared</li></td><td>SubscriptionType.Exclusive</td></tr>
+<tr><td>int</td><td><code>receiverQueueSize</code></td><td>Size of a
consumer's receiver queue. <br/><br/>For example, the number of messages that
can be accumulated by a consumer before an application calls
<code>Receive</code>. <br/><br/>A value higher than the default value increases
consumer throughput, though at the expense of more memory
utilization.</td><td>1000</td></tr>
+<tr><td>long</td><td><code>acknowledgementsGroupTimeMicros</code></td><td>Group
a consumer acknowledgment for a specified time.<br/><br/>By default, a
consumer uses 100ms grouping time to send out acknowledgments to a
broker.<br/><br/>Setting a group time of 0 sends out acknowledgments
immediately. <br/><br/>A longer ack group time is more efficient at the expense
of a slight increase in message re-deliveries after a
failure.</td><td>TimeUnit.MILLISECONDS.toMicros(100)</td></tr>
+<tr><td>long</td><td><code>negativeAckRedeliveryDelayMicros</code></td><td>Delay
to wait before redelivering messages that have failed to be process.<br/><br/>
When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed
timeout.</td><td>TimeUnit.MINUTES.toMicros(1)</td></tr>
+<tr><td>int</td><td><code>maxTotalReceiverQueueSizeAcrossPartitions</code></td><td>Max
total receiver queue size across partitions.<br/><br/>This setting reduces the
receiver queue size for individual partitions if the total receiver queue size
exceeds this value.</td><td>50000</td></tr>
+<tr><td>String</td><td><code>consumerName</code></td><td>Consumer
name</td><td>null</td></tr>
+<tr><td>long</td><td><code>ackTimeoutMillis</code></td><td>Timeout of unacked
messages</td><td>0</td></tr>
+<tr><td>long</td><td><code>tickDurationMillis</code></td><td>Granularity of
the ack-timeout redelivery.<br/><br/>Using an higher
<code>tickDurationMillis</code> reduces the memory overhead to track messages
when the ack-timeout is set to a bigger value (for example, 1
hour).</td><td>1000</td></tr>
+<tr><td>int</td><td><code>priorityLevel</code></td><td>Priority level for a
consumer to which a broker gives more priority while dispatching messages in
the shared subscription mode. <br/><br/>Here, the broker follows descending
priorities. For example, 0=max-priority, 1, 2,...<br/><br/>In the shared
subscription mode, the broker <strong>first dispatches messages to the max
priority level consumers if they have permits</strong>. Otherwise, the broker
considers next priority level consume [...]
+<tr><td>ConsumerCryptoFailureAction</td><td><code>cryptoFailureAction</code></td><td>Consumer
should take action when it receives a message that can not
decrypt.<br/><br/><li><strong>FAIL</strong>: this is the default option to fail
messages until crypto succeeds.</li><br/><li> <strong>DISCARD</strong>: message
is silently acknowledged and not delivered to an
application.</li><br/><li><strong>CONSUME</strong>: deliver encrypted messages
to applications. It is the application's responsibi [...]
+<tr><td>SortedMap<String,
String></td><td><code>properties</code></td><td>A name or value property of
this consumer.<br/><br/><code>properties</code> is application defined metadata
that can be attached to a consumer. <br/><br/>When getting a topic stats, this
metadata is associated to the consumer stats for easier
identification.</td><td>new TreeMap<>()</td></tr>
+<tr><td>boolean</td><td><code>readCompacted</code></td><td>If
<code>readCompacted</code> is enabled, a consumer reads messages from a
compacted topic rather than reading a full message backlog of a
topic.<br/><br/> This means if a topic has been compacted, a consumer only see
the latest value for each key in the topic, up until the point in the topic
message when backlog that has been compacted. Beyond that point, the messages
are sent as normal.<br/><br/><code>readCompacted</code> can o [...]
+<tr><td>SubscriptionInitialPosition</td><td><code>subscriptionInitialPosition</code></td><td>Initial
position at which to set cursor when subscribing to a topic at first
time.</td><td>SubscriptionInitialPosition.Latest</td></tr>
+<tr><td>int</td><td><code>patternAutoDiscoveryPeriod</code></td><td>Topic auto
discovery period when using a pattern for topic's consumer.<br/><br/>The
default and minimum value is 1 minute.</td><td>1</td></tr>
+<tr><td>RegexSubscriptionMode</td><td><code>regexSubscriptionMode</code></td><td>When
subscribing to a topic using a regular expression, you can pick a certain type
of topics.<br/><br/><li><strong>PersistentOnly</strong>: only subscribe to
persistent topics.</li><br/><li><strong>NonPersistentOnly</strong>: only
subscribe to non-persistent topics.</li><br/><li><strong>AllTopics</strong>:
subscribe to both persistent and non-persistent
topics.</li></td><td>RegexSubscriptionMode.PersistentO [...]
+<tr><td>DeadLetterPolicy</td><td><code>deadLetterPolicy</code></td><td>Dead
letter policy for consumers.<br/><br/>By default, some messages are redelivered
many times possible, even to the extent that it can be never stop.<br/><br/>By
using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged
automatically</strong>.<br/><br/>You can enable the dead [...]
+<tr><td>boolean</td><td><code>autoUpdatePartitions</code></td><td>If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.<br/><br/><strong>Note</strong>: this is
only for partitioned consumers.</td><td>true</td></tr>
+<tr><td>boolean</td><td><code>replicateSubscriptionState</code></td><td>If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.</td><td>false</td></tr>
+</tbody>
+</table>
+<p>To use a non-default configuration, there's a variety of configurable
parameters that you can set. For a full listing, see the Javadoc for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
class. Here's an example:</p>
<p>Here's an example configuration:</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/docs/en/next/client-libraries-java/index.html
b/content/docs/en/next/client-libraries-java/index.html
index 7ae34b5..9a94f82 100644
--- a/content/docs/en/next/client-libraries-java/index.html
+++ b/content/docs/en/next/client-libraries-java/index.html
@@ -141,14 +141,14 @@ dependencies {
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
<table>
<thead>
-<tr><th>Type</th><th>Name</th><th>Description</th><th>Default</th></tr>
+<tr><th>Type</th><th>Name</th><th><div
style="width:260px">Description</div></th><th>Default</th></tr>
</thead>
<tbody>
<tr><td>String</td><td><code>serviceUrl</code></td><td>Service URL provider
for Pulsar service</td><td>None</td></tr>
<tr><td>String</td><td><code>authPluginClassName</code></td><td>Name of the
authentication plugin</td><td>None</td></tr>
-<tr><td>String</td><td><code>authParams</code></td><td>String represents
parameters for the authentication plugin <br><strong>Example</strong><br>
key1:val1,key2:val2</td><td>None</td></tr>
+<tr><td>String</td><td><code>authParams</code></td><td>String represents
parameters for the authentication plugin
<br/><br/><strong>Example</strong><br/>
key1:val1,key2:val2</td><td>None</td></tr>
<tr><td>long</td><td><code>operationTimeoutMs</code></td><td>Operation
timeout</td><td>30000</td></tr>
-<tr><td>long</td><td><code>statsIntervalSeconds</code></td><td>Interval
between each stat info<br>Stats is activated with positive
<code>statsInterval</code><br><code>statsIntervalSeconds</code> should be set
to 1 second at least</td><td>60</td></tr>
+<tr><td>long</td><td><code>statsIntervalSeconds</code></td><td>Interval
between each stat info<br/><br/>Stats is activated with positive
<code>statsInterval</code><br/><br/><code>statsIntervalSeconds</code> should be
set to 1 second at least</td><td>60</td></tr>
<tr><td>int</td><td><code>numIoThreads</code></td><td>Number of threads used
for handling connections to brokers</td><td>1</td></tr>
<tr><td>int</td><td><code>numListenerThreads</code></td><td>Number of threads
used for handling message listeners</td><td>1</td></tr>
<tr><td>boolean</td><td><code>useTcpNoDelay</code></td><td>Whether to use TCP
no-delay flag on the connection to disable Nagle
algorithm</td><td>true</td></tr>
@@ -160,7 +160,7 @@ dependencies {
<tr><td>int</td><td><code>maxLookupRequest</code></td><td>Maximum number of
lookup requests allowed on each broker connection to prevent overload on
broker</td><td>50000</td></tr>
<tr><td>int</td><td><code>maxNumberOfRejectedRequestPerConnection</code></td><td>Maximum
number of rejected requests of a broker in a certain time frame (30 seconds)
after the current connection is closed and the client creates a new connection
to connect to a different broker</td><td>50</td></tr>
<tr><td>int</td><td><code>keepAliveIntervalSeconds</code></td><td>Seconds of
keeping alive interval for each client broker connection</td><td>30</td></tr>
-<tr><td>int</td><td><code>connectionTimeoutMs</code></td><td>Duration of
waiting for a connection to a broker to be established <br>If the duration
passes without a response from a broker, the connection attempt is
dropped</td><td>10000</td></tr>
+<tr><td>int</td><td><code>connectionTimeoutMs</code></td><td>Duration of
waiting for a connection to a broker to be established <br/><br/>If the
duration passes without a response from a broker, the connection attempt is
dropped</td><td>10000</td></tr>
<tr><td>int</td><td><code>requestTimeoutMs</code></td><td>Maximum duration for
completing a request</td><td>60000</td></tr>
<tr><td>int</td><td><code>defaultBackoffIntervalNanos</code></td><td>Default
duration for a backoff
interval</td><td>TimeUnit.MILLISECONDS.toNanos(100);</td></tr>
<tr><td>long</td><td><code>maxBackoffIntervalNanos</code></td><td>Maximum
duration for a backoff interval</td><td>TimeUnit.SECONDS.toNanos(30)</td></tr>
@@ -266,7 +266,37 @@ to have the message redelivered at a later point in
time.</p>
}
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="configuring-consumers"></a><a
href="#configuring-consumers" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
-<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration. To use a non-default configuration, there's a variety of
configurable parameters that you can set. For a full listing, see the Javadoc
for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
+<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration.</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<table>
+<thead>
+<tr><th>Type</th><th>Name</th><th><div
style="width:300px">Description</div></th><th>Default</th></tr>
+</thead>
+<tbody>
+<tr><td>Set<String></td><td><code>topicNames</code></td><td>Topic
name</td><td>Sets.newTreeSet()</td></tr>
+<tr><td>Pattern</td><td><code>topicsPattern</code></td><td>Topic
pattern</td><td>None</td></tr>
+<tr><td>String</td><td><code>subscriptionName</code></td><td>Subscription
name</td><td>None</td></tr>
+<tr><td>SubscriptionType</td><td><code>subscriptionType</code></td><td>Subscription
type <br/><br/>There are three subscription
types:<li>Exclusive</li><li>Failover</li><li>Shared</li></td><td>SubscriptionType.Exclusive</td></tr>
+<tr><td>int</td><td><code>receiverQueueSize</code></td><td>Size of a
consumer's receiver queue. <br/><br/>For example, the number of messages that
can be accumulated by a consumer before an application calls
<code>Receive</code>. <br/><br/>A value higher than the default value increases
consumer throughput, though at the expense of more memory
utilization.</td><td>1000</td></tr>
+<tr><td>long</td><td><code>acknowledgementsGroupTimeMicros</code></td><td>Group
a consumer acknowledgment for a specified time.<br/><br/>By default, a
consumer uses 100ms grouping time to send out acknowledgments to a
broker.<br/><br/>Setting a group time of 0 sends out acknowledgments
immediately. <br/><br/>A longer ack group time is more efficient at the expense
of a slight increase in message re-deliveries after a
failure.</td><td>TimeUnit.MILLISECONDS.toMicros(100)</td></tr>
+<tr><td>long</td><td><code>negativeAckRedeliveryDelayMicros</code></td><td>Delay
to wait before redelivering messages that have failed to be process.<br/><br/>
When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed
timeout.</td><td>TimeUnit.MINUTES.toMicros(1)</td></tr>
+<tr><td>int</td><td><code>maxTotalReceiverQueueSizeAcrossPartitions</code></td><td>Max
total receiver queue size across partitions.<br/><br/>This setting reduces the
receiver queue size for individual partitions if the total receiver queue size
exceeds this value.</td><td>50000</td></tr>
+<tr><td>String</td><td><code>consumerName</code></td><td>Consumer
name</td><td>null</td></tr>
+<tr><td>long</td><td><code>ackTimeoutMillis</code></td><td>Timeout of unacked
messages</td><td>0</td></tr>
+<tr><td>long</td><td><code>tickDurationMillis</code></td><td>Granularity of
the ack-timeout redelivery.<br/><br/>Using an higher
<code>tickDurationMillis</code> reduces the memory overhead to track messages
when the ack-timeout is set to a bigger value (for example, 1
hour).</td><td>1000</td></tr>
+<tr><td>int</td><td><code>priorityLevel</code></td><td>Priority level for a
consumer to which a broker gives more priority while dispatching messages in
the shared subscription mode. <br/><br/>Here, the broker follows descending
priorities. For example, 0=max-priority, 1, 2,...<br/><br/>In the shared
subscription mode, the broker <strong>first dispatches messages to the max
priority level consumers if they have permits</strong>. Otherwise, the broker
considers next priority level consume [...]
+<tr><td>ConsumerCryptoFailureAction</td><td><code>cryptoFailureAction</code></td><td>Consumer
should take action when it receives a message that can not
decrypt.<br/><br/><li><strong>FAIL</strong>: this is the default option to fail
messages until crypto succeeds.</li><br/><li> <strong>DISCARD</strong>: message
is silently acknowledged and not delivered to an
application.</li><br/><li><strong>CONSUME</strong>: deliver encrypted messages
to applications. It is the application's responsibi [...]
+<tr><td>SortedMap<String,
String></td><td><code>properties</code></td><td>A name or value property of
this consumer.<br/><br/><code>properties</code> is application defined metadata
that can be attached to a consumer. <br/><br/>When getting a topic stats, this
metadata is associated to the consumer stats for easier
identification.</td><td>new TreeMap<>()</td></tr>
+<tr><td>boolean</td><td><code>readCompacted</code></td><td>If
<code>readCompacted</code> is enabled, a consumer reads messages from a
compacted topic rather than reading a full message backlog of a
topic.<br/><br/> This means if a topic has been compacted, a consumer only see
the latest value for each key in the topic, up until the point in the topic
message when backlog that has been compacted. Beyond that point, the messages
are sent as normal.<br/><br/><code>readCompacted</code> can o [...]
+<tr><td>SubscriptionInitialPosition</td><td><code>subscriptionInitialPosition</code></td><td>Initial
position at which to set cursor when subscribing to a topic at first
time.</td><td>SubscriptionInitialPosition.Latest</td></tr>
+<tr><td>int</td><td><code>patternAutoDiscoveryPeriod</code></td><td>Topic auto
discovery period when using a pattern for topic's consumer.<br/><br/>The
default and minimum value is 1 minute.</td><td>1</td></tr>
+<tr><td>RegexSubscriptionMode</td><td><code>regexSubscriptionMode</code></td><td>When
subscribing to a topic using a regular expression, you can pick a certain type
of topics.<br/><br/><li><strong>PersistentOnly</strong>: only subscribe to
persistent topics.</li><br/><li><strong>NonPersistentOnly</strong>: only
subscribe to non-persistent topics.</li><br/><li><strong>AllTopics</strong>:
subscribe to both persistent and non-persistent
topics.</li></td><td>RegexSubscriptionMode.PersistentO [...]
+<tr><td>DeadLetterPolicy</td><td><code>deadLetterPolicy</code></td><td>Dead
letter policy for consumers.<br/><br/>By default, some messages are redelivered
many times possible, even to the extent that it can be never stop.<br/><br/>By
using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged
automatically</strong>.<br/><br/>You can enable the dead [...]
+<tr><td>boolean</td><td><code>autoUpdatePartitions</code></td><td>If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.<br/><br/><strong>Note</strong>: this is
only for partitioned consumers.</td><td>true</td></tr>
+<tr><td>boolean</td><td><code>replicateSubscriptionState</code></td><td>If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.</td><td>false</td></tr>
+</tbody>
+</table>
+<p>To use a non-default configuration, there's a variety of configurable
parameters that you can set. For a full listing, see the Javadoc for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
class. Here's an example:</p>
<p>Here's an example configuration:</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/docs/fr/next/adaptors-kafka.html
b/content/docs/fr/next/adaptors-kafka.html
index 724130f..92f868b 100644
--- a/content/docs/fr/next/adaptors-kafka.html
+++ b/content/docs/fr/next/adaptors-kafka.html
@@ -284,6 +284,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">Le
nombre maximum de recherches simultanées sur les topics.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">Le
seuil d'erreurs pour forcer la fermeture d'une connexion.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="proprietes-du-producteur-pulsar"></a><a
href="#proprietes-du-producteur-pulsar" aria-hidden="true"
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16"
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 [...]
diff --git a/content/docs/fr/next/adaptors-kafka/index.html
b/content/docs/fr/next/adaptors-kafka/index.html
index 724130f..92f868b 100644
--- a/content/docs/fr/next/adaptors-kafka/index.html
+++ b/content/docs/fr/next/adaptors-kafka/index.html
@@ -284,6 +284,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">Le
nombre maximum de recherches simultanées sur les topics.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">Le
seuil d'erreurs pour forcer la fermeture d'une connexion.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="proprietes-du-producteur-pulsar"></a><a
href="#proprietes-du-producteur-pulsar" aria-hidden="true"
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16"
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 [...]
diff --git a/content/docs/fr/next/client-libraries-java.html
b/content/docs/fr/next/client-libraries-java.html
index eeff88f..e13eca3 100644
--- a/content/docs/fr/next/client-libraries-java.html
+++ b/content/docs/fr/next/client-libraries-java.html
@@ -139,12 +139,16 @@ dependencies {
<p>Si vous exécutez un cluster en mode <a
href="/docs/fr/next/standalone">standalone</a>, le broker sera disponible à
l'URL <code>pulsar://localhost:6650</code> par défaut.</p>
</blockquote>
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
-<p>| Type | Name | Description | Default |---|---|---|--- String |
<code>serviceUrl</code> |Service URL provider for Pulsar service | None String
| <code>authPluginClassName</code> | Name of the authentication plugin | None
String | <code>authParams</code> | String represents parameters for the
authentication plugin<br>
-<strong>Example</strong> <br>
-key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info<br>
-Stats is activated with positive <code>statsInterval</code> <br>
-<code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustCert [...]
-If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
+<p>| Type | Name |</p>
+<div style="width:260px">
+ Description
+</div>
+<p>| Default |---|---|---|--- String | <code>serviceUrl</code> |Service URL
provider for Pulsar service | None String | <code>authPluginClassName</code> |
Name of the authentication plugin | None String | <code>authParams</code> |
String represents parameters for the authentication plugin</p>
+<p><strong>Example</strong> <br>
+key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info</p>
+<p>Stats is activated with positive <code>statsInterval</code></p>
+<p><code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustC [...]
+<p>If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
<p>Consultez la javadoc pour la classe <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/PulsarClient">PulsarClient</a>
pour une liste complète des paramètres configurables.</p>
<blockquote>
@@ -245,7 +249,80 @@ Les opérations de fermeture peuvent également être
asynchrones :
}
</code></pre>
<h3><a class="anchor" aria-hidden="true"
id="configuration-des-consommateurs"></a><a
href="#configuration-des-consommateurs" aria-hidden="true"
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16"
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 [...]
-<p>Si vous instanciez un objet <code>Consumer</code> spécifiant seulement un
topic et un nom d'abonnement, comme dans l'exemple ci-dessus, le consommateur
utilisera la configuration par défaut. Pour utiliser une configuration
différente de celle par défaut, il existe une variété de paramètres
configurables que vous pouvez définir. Pour une liste complète, voir la javadoc
pour la classe <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">C
[...]
+<p>Si vous instanciez un objet <code>Consumer</code> spécifiant seulement un
topic et un nom d'abonnement, comme dans l'exemple ci-dessus, le consommateur
utilisera la configuration par défaut.</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<p>Type | Name|</p>
+<div style="width:300px">
+ Description
+</div>
+<p>| Default |---|---|---|--- Set<String>| <code>topicNames</code>| Topic
name| Sets.newTreeSet() Pattern| <code>topicsPattern</code>| Topic pattern
|None String| <code>subscriptionName</code>| Subscription name| None
SubscriptionType| <code>subscriptionType</code>| Subscription type</p>
+<p>There are three subscription types:</p>
+<ul>
+<li>Exclusive</li>
+<li>Failover</li>
+<li>Shared|SubscriptionType.Exclusive int |
+<code>receiverQueueSize</code> | Size of a consumer's receiver queue.</li>
+</ul>
+<p>For example, the number of messages that can be accumulated by a consumer
before an application calls <code>Receive</code>.</p>
+<p>A value higher than the default value increases consumer throughput, though
at the expense of more memory utilization.| 1000
long|<code>acknowledgementsGroupTimeMicros</code>|Group a consumer
acknowledgment for a specified time.</p>
+<p>By default, a consumer uses 100ms grouping time to send out acknowledgments
to a broker.</p>
+<p>Setting a group time of 0 sends out acknowledgments immediately.</p>
+<p>A longer ack group time is more efficient at the expense of a slight
increase in message re-deliveries after a
failure.|TimeUnit.MILLISECONDS.toMicros(100)
long|<code>negativeAckRedeliveryDelayMicros</code>|Delay to wait before
redelivering messages that have failed to be process.</p>
+<p>When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed timeout.
|TimeUnit.MINUTES.toMicros(1) int
|<code>maxTotalReceiverQueueSizeAcrossPartitions</code>|Max total receiver
queue size across partitions.</p>
+<p>This setting reduces the receiver queue size for individual partitions if
the total receiver queue size exceeds this value.|50000
String|<code>consumerName</code>|Consumer name|null
long|<code>ackTimeoutMillis</code>|Timeout of unacked messages|0
long|<code>tickDurationMillis</code>|Granularity of the ack-timeout
redelivery.</p>
+<p>Using an higher <code>tickDurationMillis</code> reduces the memory overhead
to track messages when the ack-timeout is set to a bigger value (for example, 1
hour).|1000 int|<code>priorityLevel</code>|Priority level for a consumer to
which a broker gives more priority while dispatching messages in the shared
subscription mode.</p>
+<p>Here, the broker follows descending priorities. For example,
0=max-priority, 1, 2,...</p>
+<p>In the shared subscription mode, the broker <strong>first dispatches
messages to the max priority level consumers if they have permits</strong>.
Otherwise, the broker considers next priority level consumers.</p>
+<p><strong>Example 1</strong></p>
+<p>If a subscription has consumerA with <code>priorityLevel</code> 0 and
consumerB with <code>priorityLevel</code> 1, then the broker <strong>only
dispatches messages to consumerA until it runs out permits</strong> and then
starts dispatching messages to consumerB.</p>
+<p><strong>Example 2</strong></p>
+<p>Consumer Priority, Level, Permits<br>
+C1, 0, 2<br>
+C2, 0, 1<br>
+C3, 0, 1<br>
+C4, 1, 2<br>
+C5, 1, 1</p>
+<p>Order in which a broker dispatches messages to consumers is: C1, C2, C3,
C1, C4, C5, C4.|0
ConsumerCryptoFailureAction|<code>cryptoFailureAction</code>|Consumer should
take action when it receives a message that can not decrypt.</p>
+<ul>
+<li><strong>FAIL</strong>: this is the default option to fail messages until
crypto succeeds.</li>
+</ul>
+<ul>
+<li><strong>DISCARD</strong>: message is silently acknowledged and not
delivered to an application.</li>
+</ul>
+<ul>
+<li><p><strong>CONSUME</strong>: deliver encrypted messages to applications.
It is the application's responsibility to decrypt the message.</p>
+<p>If message are compressed, the decompression fails.</p>
+<p>If messages contain batch messages, a client is not be able to retrieve
individual messages in batch.</p>
+<p>Delivered encrypted message contains {@link EncryptionContext} which
contains encryption and compression information in it using which application
can decrypt consumed message payload.|<a
href="http://ConsumerCryptoFailureAction.FAIL">ConsumerCryptoFailureAction.FAIL</a>
SortedMap<String, String>|
+<code>properties</code>|A name or value property of this consumer.</p></li>
+</ul>
+<p><code>properties</code> is application defined metadata that can be
attached to a consumer.</p>
+<p>When getting a topic stats, this metadata is associated to the consumer
stats for easier identification.|new TreeMap<>()
boolean|<code>readCompacted</code>|If <code>readCompacted</code> is enabled, a
consumer reads messages from a compacted topic rather than reading a full
message backlog of a topic.</p>
+<p>This means if a topic has been compacted, a consumer only see the latest
value for each key in the topic, up until the point in the topic message when
backlog that has been compacted. Beyond that point, the messages are sent as
normal.</p>
+<p><code>readCompacted</code> can only be enabled on subscriptions to
persistent topics, which have a single active consumer (for example, failure or
exclusive subscriptions).</p>
+<p>Attempting to enable it on subscriptions to non-persistent topics or on
shared subscriptions leads to a subscription call throwing a
<code>PulsarClientException</code>.|false
SubscriptionInitialPosition|<code>subscriptionInitialPosition</code>|Initial
position at which to set cursor when subscribing to a topic at first
time.|SubscriptionInitialPosition.Latest
int|<code>patternAutoDiscoveryPeriod</code>|Topic auto discovery period when
using a pattern for topic's consumer.</p>
+<p>The default and minimum value is 1 minute.|1
RegexSubscriptionMode|<code>regexSubscriptionMode</code>|When subscribing to a
topic using a regular expression, you can pick a certain type of topics.</p>
+<ul>
+<li><strong>PersistentOnly</strong>: only subscribe to persistent topics.</li>
+</ul>
+<ul>
+<li><strong>NonPersistentOnly</strong>: only subscribe to non-persistent
topics.</li>
+</ul>
+<ul>
+<li><strong>AllTopics</strong>: subscribe to both persistent and
non-persistent topics.|RegexSubscriptionMode.PersistentOnly DeadLetterPolicy|
+<code>deadLetterPolicy</code>|Dead letter policy for consumers.</li>
+</ul>
+<p>By default, some messages are redelivered many times possible, even to the
extent that it can be never stop.</p>
+<p>By using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged automatically</strong>.</p>
+<p>You can enable the dead letter mechanism by setting
<code>deadLetterPolicy</code>.</p>
+<p><strong>Example</strong></p>
+<p><code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).build())<br/>.subscribe();</code></p>
+<p>Default dead letter topic name is
<code>{TopicName}-{Subscription}-DLQ</code>.</p>
+<p>To set a custom dead letter topic name:<br>
+<code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10)<br/>.deadLetterTopic("your-topic-name").build())<br/>.subscribe();</code></p>
+<p>When the dead letter policy is specified and no
<code>ackTimeoutMillis</code> is specified, then the ack timeout is set to
30000 millisecond.|None boolean|<code>autoUpdatePartitions</code>|If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.</p>
+<p><strong>Note</strong>: this is only for partitioned consumers.|true
boolean|<code>replicateSubscriptionState</code>|If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.|false</p>
+<p>Pour utiliser une configuration différente de celle par défaut, il existe
une variété de paramètres configurables que vous pouvez définir. Pour une liste
complète, voir la javadoc pour la classe <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
. Here's an example:</p>
<p>Voici un exemple de configuration :</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/docs/fr/next/client-libraries-java/index.html
b/content/docs/fr/next/client-libraries-java/index.html
index eeff88f..e13eca3 100644
--- a/content/docs/fr/next/client-libraries-java/index.html
+++ b/content/docs/fr/next/client-libraries-java/index.html
@@ -139,12 +139,16 @@ dependencies {
<p>Si vous exécutez un cluster en mode <a
href="/docs/fr/next/standalone">standalone</a>, le broker sera disponible à
l'URL <code>pulsar://localhost:6650</code> par défaut.</p>
</blockquote>
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
-<p>| Type | Name | Description | Default |---|---|---|--- String |
<code>serviceUrl</code> |Service URL provider for Pulsar service | None String
| <code>authPluginClassName</code> | Name of the authentication plugin | None
String | <code>authParams</code> | String represents parameters for the
authentication plugin<br>
-<strong>Example</strong> <br>
-key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info<br>
-Stats is activated with positive <code>statsInterval</code> <br>
-<code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustCert [...]
-If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
+<p>| Type | Name |</p>
+<div style="width:260px">
+ Description
+</div>
+<p>| Default |---|---|---|--- String | <code>serviceUrl</code> |Service URL
provider for Pulsar service | None String | <code>authPluginClassName</code> |
Name of the authentication plugin | None String | <code>authParams</code> |
String represents parameters for the authentication plugin</p>
+<p><strong>Example</strong> <br>
+key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info</p>
+<p>Stats is activated with positive <code>statsInterval</code></p>
+<p><code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustC [...]
+<p>If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
<p>Consultez la javadoc pour la classe <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/PulsarClient">PulsarClient</a>
pour une liste complète des paramètres configurables.</p>
<blockquote>
@@ -245,7 +249,80 @@ Les opérations de fermeture peuvent également être
asynchrones :
}
</code></pre>
<h3><a class="anchor" aria-hidden="true"
id="configuration-des-consommateurs"></a><a
href="#configuration-des-consommateurs" aria-hidden="true"
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16"
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 [...]
-<p>Si vous instanciez un objet <code>Consumer</code> spécifiant seulement un
topic et un nom d'abonnement, comme dans l'exemple ci-dessus, le consommateur
utilisera la configuration par défaut. Pour utiliser une configuration
différente de celle par défaut, il existe une variété de paramètres
configurables que vous pouvez définir. Pour une liste complète, voir la javadoc
pour la classe <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">C
[...]
+<p>Si vous instanciez un objet <code>Consumer</code> spécifiant seulement un
topic et un nom d'abonnement, comme dans l'exemple ci-dessus, le consommateur
utilisera la configuration par défaut.</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<p>Type | Name|</p>
+<div style="width:300px">
+ Description
+</div>
+<p>| Default |---|---|---|--- Set<String>| <code>topicNames</code>| Topic
name| Sets.newTreeSet() Pattern| <code>topicsPattern</code>| Topic pattern
|None String| <code>subscriptionName</code>| Subscription name| None
SubscriptionType| <code>subscriptionType</code>| Subscription type</p>
+<p>There are three subscription types:</p>
+<ul>
+<li>Exclusive</li>
+<li>Failover</li>
+<li>Shared|SubscriptionType.Exclusive int |
+<code>receiverQueueSize</code> | Size of a consumer's receiver queue.</li>
+</ul>
+<p>For example, the number of messages that can be accumulated by a consumer
before an application calls <code>Receive</code>.</p>
+<p>A value higher than the default value increases consumer throughput, though
at the expense of more memory utilization.| 1000
long|<code>acknowledgementsGroupTimeMicros</code>|Group a consumer
acknowledgment for a specified time.</p>
+<p>By default, a consumer uses 100ms grouping time to send out acknowledgments
to a broker.</p>
+<p>Setting a group time of 0 sends out acknowledgments immediately.</p>
+<p>A longer ack group time is more efficient at the expense of a slight
increase in message re-deliveries after a
failure.|TimeUnit.MILLISECONDS.toMicros(100)
long|<code>negativeAckRedeliveryDelayMicros</code>|Delay to wait before
redelivering messages that have failed to be process.</p>
+<p>When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed timeout.
|TimeUnit.MINUTES.toMicros(1) int
|<code>maxTotalReceiverQueueSizeAcrossPartitions</code>|Max total receiver
queue size across partitions.</p>
+<p>This setting reduces the receiver queue size for individual partitions if
the total receiver queue size exceeds this value.|50000
String|<code>consumerName</code>|Consumer name|null
long|<code>ackTimeoutMillis</code>|Timeout of unacked messages|0
long|<code>tickDurationMillis</code>|Granularity of the ack-timeout
redelivery.</p>
+<p>Using an higher <code>tickDurationMillis</code> reduces the memory overhead
to track messages when the ack-timeout is set to a bigger value (for example, 1
hour).|1000 int|<code>priorityLevel</code>|Priority level for a consumer to
which a broker gives more priority while dispatching messages in the shared
subscription mode.</p>
+<p>Here, the broker follows descending priorities. For example,
0=max-priority, 1, 2,...</p>
+<p>In the shared subscription mode, the broker <strong>first dispatches
messages to the max priority level consumers if they have permits</strong>.
Otherwise, the broker considers next priority level consumers.</p>
+<p><strong>Example 1</strong></p>
+<p>If a subscription has consumerA with <code>priorityLevel</code> 0 and
consumerB with <code>priorityLevel</code> 1, then the broker <strong>only
dispatches messages to consumerA until it runs out permits</strong> and then
starts dispatching messages to consumerB.</p>
+<p><strong>Example 2</strong></p>
+<p>Consumer Priority, Level, Permits<br>
+C1, 0, 2<br>
+C2, 0, 1<br>
+C3, 0, 1<br>
+C4, 1, 2<br>
+C5, 1, 1</p>
+<p>Order in which a broker dispatches messages to consumers is: C1, C2, C3,
C1, C4, C5, C4.|0
ConsumerCryptoFailureAction|<code>cryptoFailureAction</code>|Consumer should
take action when it receives a message that can not decrypt.</p>
+<ul>
+<li><strong>FAIL</strong>: this is the default option to fail messages until
crypto succeeds.</li>
+</ul>
+<ul>
+<li><strong>DISCARD</strong>: message is silently acknowledged and not
delivered to an application.</li>
+</ul>
+<ul>
+<li><p><strong>CONSUME</strong>: deliver encrypted messages to applications.
It is the application's responsibility to decrypt the message.</p>
+<p>If message are compressed, the decompression fails.</p>
+<p>If messages contain batch messages, a client is not be able to retrieve
individual messages in batch.</p>
+<p>Delivered encrypted message contains {@link EncryptionContext} which
contains encryption and compression information in it using which application
can decrypt consumed message payload.|<a
href="http://ConsumerCryptoFailureAction.FAIL">ConsumerCryptoFailureAction.FAIL</a>
SortedMap<String, String>|
+<code>properties</code>|A name or value property of this consumer.</p></li>
+</ul>
+<p><code>properties</code> is application defined metadata that can be
attached to a consumer.</p>
+<p>When getting a topic stats, this metadata is associated to the consumer
stats for easier identification.|new TreeMap<>()
boolean|<code>readCompacted</code>|If <code>readCompacted</code> is enabled, a
consumer reads messages from a compacted topic rather than reading a full
message backlog of a topic.</p>
+<p>This means if a topic has been compacted, a consumer only see the latest
value for each key in the topic, up until the point in the topic message when
backlog that has been compacted. Beyond that point, the messages are sent as
normal.</p>
+<p><code>readCompacted</code> can only be enabled on subscriptions to
persistent topics, which have a single active consumer (for example, failure or
exclusive subscriptions).</p>
+<p>Attempting to enable it on subscriptions to non-persistent topics or on
shared subscriptions leads to a subscription call throwing a
<code>PulsarClientException</code>.|false
SubscriptionInitialPosition|<code>subscriptionInitialPosition</code>|Initial
position at which to set cursor when subscribing to a topic at first
time.|SubscriptionInitialPosition.Latest
int|<code>patternAutoDiscoveryPeriod</code>|Topic auto discovery period when
using a pattern for topic's consumer.</p>
+<p>The default and minimum value is 1 minute.|1
RegexSubscriptionMode|<code>regexSubscriptionMode</code>|When subscribing to a
topic using a regular expression, you can pick a certain type of topics.</p>
+<ul>
+<li><strong>PersistentOnly</strong>: only subscribe to persistent topics.</li>
+</ul>
+<ul>
+<li><strong>NonPersistentOnly</strong>: only subscribe to non-persistent
topics.</li>
+</ul>
+<ul>
+<li><strong>AllTopics</strong>: subscribe to both persistent and
non-persistent topics.|RegexSubscriptionMode.PersistentOnly DeadLetterPolicy|
+<code>deadLetterPolicy</code>|Dead letter policy for consumers.</li>
+</ul>
+<p>By default, some messages are redelivered many times possible, even to the
extent that it can be never stop.</p>
+<p>By using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged automatically</strong>.</p>
+<p>You can enable the dead letter mechanism by setting
<code>deadLetterPolicy</code>.</p>
+<p><strong>Example</strong></p>
+<p><code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).build())<br/>.subscribe();</code></p>
+<p>Default dead letter topic name is
<code>{TopicName}-{Subscription}-DLQ</code>.</p>
+<p>To set a custom dead letter topic name:<br>
+<code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10)<br/>.deadLetterTopic("your-topic-name").build())<br/>.subscribe();</code></p>
+<p>When the dead letter policy is specified and no
<code>ackTimeoutMillis</code> is specified, then the ack timeout is set to
30000 millisecond.|None boolean|<code>autoUpdatePartitions</code>|If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.</p>
+<p><strong>Note</strong>: this is only for partitioned consumers.|true
boolean|<code>replicateSubscriptionState</code>|If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.|false</p>
+<p>Pour utiliser une configuration différente de celle par défaut, il existe
une variété de paramètres configurables que vous pouvez définir. Pour une liste
complète, voir la javadoc pour la classe <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
. Here's an example:</p>
<p>Voici un exemple de configuration :</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/docs/ja/next/adaptors-kafka.html
b/content/docs/ja/next/adaptors-kafka.html
index 9737815..beb22c7 100644
--- a/content/docs/ja/next/adaptors-kafka.html
+++ b/content/docs/ja/next/adaptors-kafka.html
@@ -284,6 +284,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">The
maximum number of concurrent topic lookups.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">The
threshold of errors to forcefully close a connection.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="pulsar-producer-properties"></a><a href="#pulsar-producer-properties"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H [...]
diff --git a/content/docs/ja/next/adaptors-kafka/index.html
b/content/docs/ja/next/adaptors-kafka/index.html
index 9737815..beb22c7 100644
--- a/content/docs/ja/next/adaptors-kafka/index.html
+++ b/content/docs/ja/next/adaptors-kafka/index.html
@@ -284,6 +284,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">The
maximum number of concurrent topic lookups.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">The
threshold of errors to forcefully close a connection.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="pulsar-producer-properties"></a><a href="#pulsar-producer-properties"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H [...]
diff --git a/content/docs/ja/next/client-libraries-java.html
b/content/docs/ja/next/client-libraries-java.html
index d5d0f93..00a90eb 100644
--- a/content/docs/ja/next/client-libraries-java.html
+++ b/content/docs/ja/next/client-libraries-java.html
@@ -139,12 +139,16 @@ dependencies {
<p>If you're running a cluster in <a
href="/docs/ja/next/standalone">standalone mode</a>, the broker will be
available at the <code>pulsar://localhost:6650</code> URL by default.</p>
</blockquote>
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
-<p>| Type | Name | Description | Default |---|---|---|--- String |
<code>serviceUrl</code> |Service URL provider for Pulsar service | None String
| <code>authPluginClassName</code> | Name of the authentication plugin | None
String | <code>authParams</code> | String represents parameters for the
authentication plugin<br>
-<strong>Example</strong> <br>
-key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info<br>
-Stats is activated with positive <code>statsInterval</code> <br>
-<code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustCert [...]
-If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
+<p>| Type | Name |</p>
+<div style="width:260px">
+ Description
+</div>
+<p>| Default |---|---|---|--- String | <code>serviceUrl</code> |Service URL
provider for Pulsar service | None String | <code>authPluginClassName</code> |
Name of the authentication plugin | None String | <code>authParams</code> |
String represents parameters for the authentication plugin</p>
+<p><strong>Example</strong> <br>
+key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info</p>
+<p>Stats is activated with positive <code>statsInterval</code></p>
+<p><code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustC [...]
+<p>If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
<p>Check out the Javadoc for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/PulsarClient">PulsarClient</a>
class for a full listing of configurable parameters.</p>
<blockquote>
@@ -246,7 +250,80 @@ client.close();</p>
}
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="configuring-consumers"></a><a
href="#configuring-consumers" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
-<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration. To use a non-default configuration, there's a variety of
configurable parameters that you can set. For a full listing, see the Javadoc
for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
+<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration.</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<p>Type | Name|</p>
+<div style="width:300px">
+ Description
+</div>
+<p>| Default |---|---|---|--- Set<String>| <code>topicNames</code>| Topic
name| Sets.newTreeSet() Pattern| <code>topicsPattern</code>| Topic pattern
|None String| <code>subscriptionName</code>| Subscription name| None
SubscriptionType| <code>subscriptionType</code>| Subscription type</p>
+<p>There are three subscription types:</p>
+<ul>
+<li>Exclusive</li>
+<li>Failover</li>
+<li>Shared|SubscriptionType.Exclusive int |
+<code>receiverQueueSize</code> | Size of a consumer's receiver queue.</li>
+</ul>
+<p>For example, the number of messages that can be accumulated by a consumer
before an application calls <code>Receive</code>.</p>
+<p>A value higher than the default value increases consumer throughput, though
at the expense of more memory utilization.| 1000
long|<code>acknowledgementsGroupTimeMicros</code>|Group a consumer
acknowledgment for a specified time.</p>
+<p>By default, a consumer uses 100ms grouping time to send out acknowledgments
to a broker.</p>
+<p>Setting a group time of 0 sends out acknowledgments immediately.</p>
+<p>A longer ack group time is more efficient at the expense of a slight
increase in message re-deliveries after a
failure.|TimeUnit.MILLISECONDS.toMicros(100)
long|<code>negativeAckRedeliveryDelayMicros</code>|Delay to wait before
redelivering messages that have failed to be process.</p>
+<p>When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed timeout.
|TimeUnit.MINUTES.toMicros(1) int
|<code>maxTotalReceiverQueueSizeAcrossPartitions</code>|Max total receiver
queue size across partitions.</p>
+<p>This setting reduces the receiver queue size for individual partitions if
the total receiver queue size exceeds this value.|50000
String|<code>consumerName</code>|Consumer name|null
long|<code>ackTimeoutMillis</code>|Timeout of unacked messages|0
long|<code>tickDurationMillis</code>|Granularity of the ack-timeout
redelivery.</p>
+<p>Using an higher <code>tickDurationMillis</code> reduces the memory overhead
to track messages when the ack-timeout is set to a bigger value (for example, 1
hour).|1000 int|<code>priorityLevel</code>|Priority level for a consumer to
which a broker gives more priority while dispatching messages in the shared
subscription mode.</p>
+<p>Here, the broker follows descending priorities. For example,
0=max-priority, 1, 2,...</p>
+<p>In the shared subscription mode, the broker <strong>first dispatches
messages to the max priority level consumers if they have permits</strong>.
Otherwise, the broker considers next priority level consumers.</p>
+<p><strong>Example 1</strong></p>
+<p>If a subscription has consumerA with <code>priorityLevel</code> 0 and
consumerB with <code>priorityLevel</code> 1, then the broker <strong>only
dispatches messages to consumerA until it runs out permits</strong> and then
starts dispatching messages to consumerB.</p>
+<p><strong>Example 2</strong></p>
+<p>Consumer Priority, Level, Permits<br>
+C1, 0, 2<br>
+C2, 0, 1<br>
+C3, 0, 1<br>
+C4, 1, 2<br>
+C5, 1, 1</p>
+<p>Order in which a broker dispatches messages to consumers is: C1, C2, C3,
C1, C4, C5, C4.|0
ConsumerCryptoFailureAction|<code>cryptoFailureAction</code>|Consumer should
take action when it receives a message that can not decrypt.</p>
+<ul>
+<li><strong>FAIL</strong>: this is the default option to fail messages until
crypto succeeds.</li>
+</ul>
+<ul>
+<li><strong>DISCARD</strong>: message is silently acknowledged and not
delivered to an application.</li>
+</ul>
+<ul>
+<li><p><strong>CONSUME</strong>: deliver encrypted messages to applications.
It is the application's responsibility to decrypt the message.</p>
+<p>If message are compressed, the decompression fails.</p>
+<p>If messages contain batch messages, a client is not be able to retrieve
individual messages in batch.</p>
+<p>Delivered encrypted message contains {@link EncryptionContext} which
contains encryption and compression information in it using which application
can decrypt consumed message payload.|<a
href="http://ConsumerCryptoFailureAction.FAIL">ConsumerCryptoFailureAction.FAIL</a>
SortedMap<String, String>|
+<code>properties</code>|A name or value property of this consumer.</p></li>
+</ul>
+<p><code>properties</code> is application defined metadata that can be
attached to a consumer.</p>
+<p>When getting a topic stats, this metadata is associated to the consumer
stats for easier identification.|new TreeMap<>()
boolean|<code>readCompacted</code>|If <code>readCompacted</code> is enabled, a
consumer reads messages from a compacted topic rather than reading a full
message backlog of a topic.</p>
+<p>This means if a topic has been compacted, a consumer only see the latest
value for each key in the topic, up until the point in the topic message when
backlog that has been compacted. Beyond that point, the messages are sent as
normal.</p>
+<p><code>readCompacted</code> can only be enabled on subscriptions to
persistent topics, which have a single active consumer (for example, failure or
exclusive subscriptions).</p>
+<p>Attempting to enable it on subscriptions to non-persistent topics or on
shared subscriptions leads to a subscription call throwing a
<code>PulsarClientException</code>.|false
SubscriptionInitialPosition|<code>subscriptionInitialPosition</code>|Initial
position at which to set cursor when subscribing to a topic at first
time.|SubscriptionInitialPosition.Latest
int|<code>patternAutoDiscoveryPeriod</code>|Topic auto discovery period when
using a pattern for topic's consumer.</p>
+<p>The default and minimum value is 1 minute.|1
RegexSubscriptionMode|<code>regexSubscriptionMode</code>|When subscribing to a
topic using a regular expression, you can pick a certain type of topics.</p>
+<ul>
+<li><strong>PersistentOnly</strong>: only subscribe to persistent topics.</li>
+</ul>
+<ul>
+<li><strong>NonPersistentOnly</strong>: only subscribe to non-persistent
topics.</li>
+</ul>
+<ul>
+<li><strong>AllTopics</strong>: subscribe to both persistent and
non-persistent topics.|RegexSubscriptionMode.PersistentOnly DeadLetterPolicy|
+<code>deadLetterPolicy</code>|Dead letter policy for consumers.</li>
+</ul>
+<p>By default, some messages are redelivered many times possible, even to the
extent that it can be never stop.</p>
+<p>By using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged automatically</strong>.</p>
+<p>You can enable the dead letter mechanism by setting
<code>deadLetterPolicy</code>.</p>
+<p><strong>Example</strong></p>
+<p><code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).build())<br/>.subscribe();</code></p>
+<p>Default dead letter topic name is
<code>{TopicName}-{Subscription}-DLQ</code>.</p>
+<p>To set a custom dead letter topic name:<br>
+<code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10)<br/>.deadLetterTopic("your-topic-name").build())<br/>.subscribe();</code></p>
+<p>When the dead letter policy is specified and no
<code>ackTimeoutMillis</code> is specified, then the ack timeout is set to
30000 millisecond.|None boolean|<code>autoUpdatePartitions</code>|If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.</p>
+<p><strong>Note</strong>: this is only for partitioned consumers.|true
boolean|<code>replicateSubscriptionState</code>|If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.|false</p>
+<p>To use a non-default configuration, there's a variety of configurable
parameters that you can set. For a full listing, see the Javadoc for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
class. Here's an example:</p>
<p>Here's an example configuration:</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/docs/ja/next/client-libraries-java/index.html
b/content/docs/ja/next/client-libraries-java/index.html
index d5d0f93..00a90eb 100644
--- a/content/docs/ja/next/client-libraries-java/index.html
+++ b/content/docs/ja/next/client-libraries-java/index.html
@@ -139,12 +139,16 @@ dependencies {
<p>If you're running a cluster in <a
href="/docs/ja/next/standalone">standalone mode</a>, the broker will be
available at the <code>pulsar://localhost:6650</code> URL by default.</p>
</blockquote>
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
-<p>| Type | Name | Description | Default |---|---|---|--- String |
<code>serviceUrl</code> |Service URL provider for Pulsar service | None String
| <code>authPluginClassName</code> | Name of the authentication plugin | None
String | <code>authParams</code> | String represents parameters for the
authentication plugin<br>
-<strong>Example</strong> <br>
-key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info<br>
-Stats is activated with positive <code>statsInterval</code> <br>
-<code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustCert [...]
-If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
+<p>| Type | Name |</p>
+<div style="width:260px">
+ Description
+</div>
+<p>| Default |---|---|---|--- String | <code>serviceUrl</code> |Service URL
provider for Pulsar service | None String | <code>authPluginClassName</code> |
Name of the authentication plugin | None String | <code>authParams</code> |
String represents parameters for the authentication plugin</p>
+<p><strong>Example</strong> <br>
+key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info</p>
+<p>Stats is activated with positive <code>statsInterval</code></p>
+<p><code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustC [...]
+<p>If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
<p>Check out the Javadoc for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/PulsarClient">PulsarClient</a>
class for a full listing of configurable parameters.</p>
<blockquote>
@@ -246,7 +250,80 @@ client.close();</p>
}
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="configuring-consumers"></a><a
href="#configuring-consumers" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2 [...]
-<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration. To use a non-default configuration, there's a variety of
configurable parameters that you can set. For a full listing, see the Javadoc
for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
+<p>If you instantiate a <code>Consumer</code> object specifying only a topic
and subscription name, as in the example above, the consumer will use the
default configuration.</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<p>Type | Name|</p>
+<div style="width:300px">
+ Description
+</div>
+<p>| Default |---|---|---|--- Set<String>| <code>topicNames</code>| Topic
name| Sets.newTreeSet() Pattern| <code>topicsPattern</code>| Topic pattern
|None String| <code>subscriptionName</code>| Subscription name| None
SubscriptionType| <code>subscriptionType</code>| Subscription type</p>
+<p>There are three subscription types:</p>
+<ul>
+<li>Exclusive</li>
+<li>Failover</li>
+<li>Shared|SubscriptionType.Exclusive int |
+<code>receiverQueueSize</code> | Size of a consumer's receiver queue.</li>
+</ul>
+<p>For example, the number of messages that can be accumulated by a consumer
before an application calls <code>Receive</code>.</p>
+<p>A value higher than the default value increases consumer throughput, though
at the expense of more memory utilization.| 1000
long|<code>acknowledgementsGroupTimeMicros</code>|Group a consumer
acknowledgment for a specified time.</p>
+<p>By default, a consumer uses 100ms grouping time to send out acknowledgments
to a broker.</p>
+<p>Setting a group time of 0 sends out acknowledgments immediately.</p>
+<p>A longer ack group time is more efficient at the expense of a slight
increase in message re-deliveries after a
failure.|TimeUnit.MILLISECONDS.toMicros(100)
long|<code>negativeAckRedeliveryDelayMicros</code>|Delay to wait before
redelivering messages that have failed to be process.</p>
+<p>When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed timeout.
|TimeUnit.MINUTES.toMicros(1) int
|<code>maxTotalReceiverQueueSizeAcrossPartitions</code>|Max total receiver
queue size across partitions.</p>
+<p>This setting reduces the receiver queue size for individual partitions if
the total receiver queue size exceeds this value.|50000
String|<code>consumerName</code>|Consumer name|null
long|<code>ackTimeoutMillis</code>|Timeout of unacked messages|0
long|<code>tickDurationMillis</code>|Granularity of the ack-timeout
redelivery.</p>
+<p>Using an higher <code>tickDurationMillis</code> reduces the memory overhead
to track messages when the ack-timeout is set to a bigger value (for example, 1
hour).|1000 int|<code>priorityLevel</code>|Priority level for a consumer to
which a broker gives more priority while dispatching messages in the shared
subscription mode.</p>
+<p>Here, the broker follows descending priorities. For example,
0=max-priority, 1, 2,...</p>
+<p>In the shared subscription mode, the broker <strong>first dispatches
messages to the max priority level consumers if they have permits</strong>.
Otherwise, the broker considers next priority level consumers.</p>
+<p><strong>Example 1</strong></p>
+<p>If a subscription has consumerA with <code>priorityLevel</code> 0 and
consumerB with <code>priorityLevel</code> 1, then the broker <strong>only
dispatches messages to consumerA until it runs out permits</strong> and then
starts dispatching messages to consumerB.</p>
+<p><strong>Example 2</strong></p>
+<p>Consumer Priority, Level, Permits<br>
+C1, 0, 2<br>
+C2, 0, 1<br>
+C3, 0, 1<br>
+C4, 1, 2<br>
+C5, 1, 1</p>
+<p>Order in which a broker dispatches messages to consumers is: C1, C2, C3,
C1, C4, C5, C4.|0
ConsumerCryptoFailureAction|<code>cryptoFailureAction</code>|Consumer should
take action when it receives a message that can not decrypt.</p>
+<ul>
+<li><strong>FAIL</strong>: this is the default option to fail messages until
crypto succeeds.</li>
+</ul>
+<ul>
+<li><strong>DISCARD</strong>: message is silently acknowledged and not
delivered to an application.</li>
+</ul>
+<ul>
+<li><p><strong>CONSUME</strong>: deliver encrypted messages to applications.
It is the application's responsibility to decrypt the message.</p>
+<p>If message are compressed, the decompression fails.</p>
+<p>If messages contain batch messages, a client is not be able to retrieve
individual messages in batch.</p>
+<p>Delivered encrypted message contains {@link EncryptionContext} which
contains encryption and compression information in it using which application
can decrypt consumed message payload.|<a
href="http://ConsumerCryptoFailureAction.FAIL">ConsumerCryptoFailureAction.FAIL</a>
SortedMap<String, String>|
+<code>properties</code>|A name or value property of this consumer.</p></li>
+</ul>
+<p><code>properties</code> is application defined metadata that can be
attached to a consumer.</p>
+<p>When getting a topic stats, this metadata is associated to the consumer
stats for easier identification.|new TreeMap<>()
boolean|<code>readCompacted</code>|If <code>readCompacted</code> is enabled, a
consumer reads messages from a compacted topic rather than reading a full
message backlog of a topic.</p>
+<p>This means if a topic has been compacted, a consumer only see the latest
value for each key in the topic, up until the point in the topic message when
backlog that has been compacted. Beyond that point, the messages are sent as
normal.</p>
+<p><code>readCompacted</code> can only be enabled on subscriptions to
persistent topics, which have a single active consumer (for example, failure or
exclusive subscriptions).</p>
+<p>Attempting to enable it on subscriptions to non-persistent topics or on
shared subscriptions leads to a subscription call throwing a
<code>PulsarClientException</code>.|false
SubscriptionInitialPosition|<code>subscriptionInitialPosition</code>|Initial
position at which to set cursor when subscribing to a topic at first
time.|SubscriptionInitialPosition.Latest
int|<code>patternAutoDiscoveryPeriod</code>|Topic auto discovery period when
using a pattern for topic's consumer.</p>
+<p>The default and minimum value is 1 minute.|1
RegexSubscriptionMode|<code>regexSubscriptionMode</code>|When subscribing to a
topic using a regular expression, you can pick a certain type of topics.</p>
+<ul>
+<li><strong>PersistentOnly</strong>: only subscribe to persistent topics.</li>
+</ul>
+<ul>
+<li><strong>NonPersistentOnly</strong>: only subscribe to non-persistent
topics.</li>
+</ul>
+<ul>
+<li><strong>AllTopics</strong>: subscribe to both persistent and
non-persistent topics.|RegexSubscriptionMode.PersistentOnly DeadLetterPolicy|
+<code>deadLetterPolicy</code>|Dead letter policy for consumers.</li>
+</ul>
+<p>By default, some messages are redelivered many times possible, even to the
extent that it can be never stop.</p>
+<p>By using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged automatically</strong>.</p>
+<p>You can enable the dead letter mechanism by setting
<code>deadLetterPolicy</code>.</p>
+<p><strong>Example</strong></p>
+<p><code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).build())<br/>.subscribe();</code></p>
+<p>Default dead letter topic name is
<code>{TopicName}-{Subscription}-DLQ</code>.</p>
+<p>To set a custom dead letter topic name:<br>
+<code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10)<br/>.deadLetterTopic("your-topic-name").build())<br/>.subscribe();</code></p>
+<p>When the dead letter policy is specified and no
<code>ackTimeoutMillis</code> is specified, then the ack timeout is set to
30000 millisecond.|None boolean|<code>autoUpdatePartitions</code>|If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.</p>
+<p><strong>Note</strong>: this is only for partitioned consumers.|true
boolean|<code>replicateSubscriptionState</code>|If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.|false</p>
+<p>To use a non-default configuration, there's a variety of configurable
parameters that you can set. For a full listing, see the Javadoc for the <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
class. Here's an example:</p>
<p>Here's an example configuration:</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/docs/zh-CN/next/adaptors-kafka.html
b/content/docs/zh-CN/next/adaptors-kafka.html
index 4c6ee96..b4601d2 100644
--- a/content/docs/zh-CN/next/adaptors-kafka.html
+++ b/content/docs/zh-CN/next/adaptors-kafka.html
@@ -284,6 +284,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">The
maximum number of concurrent topic lookups.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">The
threshold of errors to forcefully close a connection.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="pulsar-producer-properties"></a><a href="#pulsar-producer-properties"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H [...]
diff --git a/content/docs/zh-CN/next/adaptors-kafka/index.html
b/content/docs/zh-CN/next/adaptors-kafka/index.html
index 4c6ee96..b4601d2 100644
--- a/content/docs/zh-CN/next/adaptors-kafka/index.html
+++ b/content/docs/zh-CN/next/adaptors-kafka/index.html
@@ -284,6 +284,7 @@ consumer.subscribe(Arrays.asList(topic));
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setUseTcpNoDelay-boolean-"><code>pulsar.use.tcp.nodelay</code></a></td><td
style="text-align:left"><code>true</code></td><td style="text-align:left">TCP
no-delay.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setConcurrentLookupRequest-int-"><code>pulsar.concurrent.lookup.requests</code></a></td><td
style="text-align:left"><code>50000</code></td><td style="text-align:left">The
maximum number of concurrent topic lookups.</td></tr>
<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientConfiguration.html#setMaxNumberOfRejectedRequestPerConnection-int-"><code>pulsar.max.number.rejected.request.per.connection</code></a></td><td
style="text-align:left"><code>50</code></td><td style="text-align:left">The
threshold of errors to forcefully close a connection.</td></tr>
+<tr><td style="text-align:left"><a
href="http://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ClientBuilder.html#keepAliveInterval-int-java.util.concurrent.TimeUnit-"><code>pulsar.keepalive.interval.ms</code></a></td><td
style="text-align:left"><code>30000</code></td><td
style="text-align:left">Keep alive interval for each
client-broker-connection.</td></tr>
</tbody>
</table>
<h3><a class="anchor" aria-hidden="true"
id="pulsar-producer-properties"></a><a href="#pulsar-producer-properties"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H [...]
diff --git a/content/docs/zh-CN/next/client-libraries-java.html
b/content/docs/zh-CN/next/client-libraries-java.html
index 4c5c370..f97e809 100644
--- a/content/docs/zh-CN/next/client-libraries-java.html
+++ b/content/docs/zh-CN/next/client-libraries-java.html
@@ -139,12 +139,16 @@ dependencies {
<p>如果你使用<a
href="/docs/zh-CN/next/standalone">单机模式</a>运行一个集群,broker将默认使用<code>pulsar://localhost:6650</code></p>
</blockquote>
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
-<p>| Type | Name | Description | Default |---|---|---|--- String |
<code>serviceUrl</code> |Service URL provider for Pulsar service | None String
| <code>authPluginClassName</code> | Name of the authentication plugin | None
String | <code>authParams</code> | String represents parameters for the
authentication plugin<br>
-<strong>Example</strong> <br>
-key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info<br>
-Stats is activated with positive <code>statsInterval</code> <br>
-<code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustCert [...]
-If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
+<p>| Type | Name |</p>
+<div style="width:260px">
+ 说明:
+</div>
+<p>| Default |---|---|---|--- String | <code>serviceUrl</code> |Service URL
provider for Pulsar service | None String | <code>authPluginClassName</code> |
Name of the authentication plugin | None String | <code>authParams</code> |
String represents parameters for the authentication plugin</p>
+<p><strong>Example</strong> <br>
+key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info</p>
+<p>Stats is activated with positive <code>statsInterval</code></p>
+<p><code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustC [...]
+<p>If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
<p>完整的配置参数列表参考 <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/PulsarClient">PulsarClient</a>
类的javadoc文档 。</p>
<blockquote>
@@ -246,7 +250,80 @@ client.close();</p>
}
</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.09 [...]
-<p>如果实例化 <code>消费者</code> 对象, 仅指定主题和订阅名称, 如上面的示例所示, 消费者将采用默认配置。 要使用非默认配置,
你可以设置多种可配置的参数。 有关完整列表, 请参阅 <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
+<p>如果实例化 <code>消费者</code> 对象, 仅指定主题和订阅名称, 如上面的示例所示, 消费者将采用默认配置。</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<p>Type | Name|</p>
+<div style="width:300px">
+ 说明:
+</div>
+<p>| Default |---|---|---|--- Set<String>| <code>topicNames</code>| Topic
name| Sets.newTreeSet() Pattern| <code>topicsPattern</code>| Topic pattern
|None String| <code>subscriptionName</code>| Subscription name| None
SubscriptionType| <code>subscriptionType</code>| Subscription type</p>
+<p>There are three subscription types:</p>
+<ul>
+<li>Exclusive</li>
+<li>Failover(灾备)</li>
+<li>Shared(共享)|SubscriptionType.Exclusive int |
+<code>receiverQueueSize</code> | Size of a consumer's receiver queue.</li>
+</ul>
+<p>For example, the number of messages that can be accumulated by a consumer
before an application calls <code>Receive</code>.</p>
+<p>A value higher than the default value increases consumer throughput, though
at the expense of more memory utilization.| 1000
long|<code>acknowledgementsGroupTimeMicros</code>|Group a consumer
acknowledgment for a specified time.</p>
+<p>By default, a consumer uses 100ms grouping time to send out acknowledgments
to a broker.</p>
+<p>Setting a group time of 0 sends out acknowledgments immediately.</p>
+<p>A longer ack group time is more efficient at the expense of a slight
increase in message re-deliveries after a
failure.|TimeUnit.MILLISECONDS.toMicros(100)
long|<code>negativeAckRedeliveryDelayMicros</code>|Delay to wait before
redelivering messages that have failed to be process.</p>
+<p>When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed timeout.
|TimeUnit.MINUTES.toMicros(1) int
|<code>maxTotalReceiverQueueSizeAcrossPartitions</code>|Max total receiver
queue size across partitions.</p>
+<p>This setting reduces the receiver queue size for individual partitions if
the total receiver queue size exceeds this value.|50000
String|<code>consumerName</code>|Consumer name|null
long|<code>ackTimeoutMillis</code>|Timeout of unacked messages|0
long|<code>tickDurationMillis</code>|Granularity of the ack-timeout
redelivery.</p>
+<p>Using an higher <code>tickDurationMillis</code> reduces the memory overhead
to track messages when the ack-timeout is set to a bigger value (for example, 1
hour).|1000 int|<code>priorityLevel</code>|Priority level for a consumer to
which a broker gives more priority while dispatching messages in the shared
subscription mode.</p>
+<p>Here, the broker follows descending priorities. For example,
0=max-priority, 1, 2,...</p>
+<p>In the shared subscription mode, the broker <strong>first dispatches
messages to the max priority level consumers if they have permits</strong>.
Otherwise, the broker considers next priority level consumers.</p>
+<p><strong>Example 1</strong></p>
+<p>If a subscription has consumerA with <code>priorityLevel</code> 0 and
consumerB with <code>priorityLevel</code> 1, then the broker <strong>only
dispatches messages to consumerA until it runs out permits</strong> and then
starts dispatching messages to consumerB.</p>
+<p><strong>Example 2</strong></p>
+<p>Consumer Priority, Level, Permits<br>
+C1, 0, 2<br>
+C2, 0, 1<br>
+C3, 0, 1<br>
+C4, 1, 2<br>
+C5, 1, 1</p>
+<p>Order in which a broker dispatches messages to consumers is: C1, C2, C3,
C1, C4, C5, C4.|0
ConsumerCryptoFailureAction|<code>cryptoFailureAction</code>|Consumer should
take action when it receives a message that can not decrypt.</p>
+<ul>
+<li><strong>FAIL</strong>: this is the default option to fail messages until
crypto succeeds.</li>
+</ul>
+<ul>
+<li><strong>DISCARD</strong>: message is silently acknowledged and not
delivered to an application.</li>
+</ul>
+<ul>
+<li><p><strong>CONSUME</strong>: deliver encrypted messages to applications.
It is the application's responsibility to decrypt the message.</p>
+<p>If message are compressed, the decompression fails.</p>
+<p>If messages contain batch messages, a client is not be able to retrieve
individual messages in batch.</p>
+<p>Delivered encrypted message contains {@link EncryptionContext} which
contains encryption and compression information in it using which application
can decrypt consumed message payload.|<a
href="http://ConsumerCryptoFailureAction.FAIL">ConsumerCryptoFailureAction.FAIL</a>
SortedMap<String, String>|
+<code>properties</code>|A name or value property of this consumer.</p></li>
+</ul>
+<p><code>properties</code> is application defined metadata that can be
attached to a consumer.</p>
+<p>When getting a topic stats, this metadata is associated to the consumer
stats for easier identification.|new TreeMap<>()
boolean|<code>readCompacted</code>|If <code>readCompacted</code> is enabled, a
consumer reads messages from a compacted topic rather than reading a full
message backlog of a topic.</p>
+<p>This means if a topic has been compacted, a consumer only see the latest
value for each key in the topic, up until the point in the topic message when
backlog that has been compacted. Beyond that point, the messages are sent as
normal.</p>
+<p><code>readCompacted</code> can only be enabled on subscriptions to
persistent topics, which have a single active consumer (for example, failure or
exclusive subscriptions).</p>
+<p>Attempting to enable it on subscriptions to non-persistent topics or on
shared subscriptions leads to a subscription call throwing a
<code>PulsarClientException</code>.|false
SubscriptionInitialPosition|<code>subscriptionInitialPosition</code>|Initial
position at which to set cursor when subscribing to a topic at first
time.|SubscriptionInitialPosition.Latest
int|<code>patternAutoDiscoveryPeriod</code>|Topic auto discovery period when
using a pattern for topic's consumer.</p>
+<p>The default and minimum value is 1 minute.|1
RegexSubscriptionMode|<code>regexSubscriptionMode</code>|When subscribing to a
topic using a regular expression, you can pick a certain type of topics.</p>
+<ul>
+<li><strong>PersistentOnly</strong>: only subscribe to persistent topics.</li>
+</ul>
+<ul>
+<li><strong>NonPersistentOnly</strong>: only subscribe to non-persistent
topics.</li>
+</ul>
+<ul>
+<li><strong>AllTopics</strong>: subscribe to both persistent and
non-persistent topics.|RegexSubscriptionMode.PersistentOnly DeadLetterPolicy|
+<code>deadLetterPolicy</code>|Dead letter policy for consumers.</li>
+</ul>
+<p>By default, some messages are redelivered many times possible, even to the
extent that it can be never stop.</p>
+<p>By using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged automatically</strong>.</p>
+<p>You can enable the dead letter mechanism by setting
<code>deadLetterPolicy</code>.</p>
+<p><strong>Example</strong></p>
+<p><code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).build())<br/>.subscribe();</code></p>
+<p>Default dead letter topic name is
<code>{TopicName}-{Subscription}-DLQ</code>.</p>
+<p>To set a custom dead letter topic name:<br>
+<code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10)<br/>.deadLetterTopic("your-topic-name").build())<br/>.subscribe();</code></p>
+<p>When the dead letter policy is specified and no
<code>ackTimeoutMillis</code> is specified, then the ack timeout is set to
30000 millisecond.|None boolean|<code>autoUpdatePartitions</code>|If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.</p>
+<p><strong>Note</strong>: this is only for partitioned consumers.|true
boolean|<code>replicateSubscriptionState</code>|If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.|false</p>
+<p>要使用非默认配置, 你可以设置多种可配置的参数。 有关完整列表, 请参阅 <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
类javadoc文档。 下面是一个示例:</p>
<p>这是一个示例配置:</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
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 4c5c370..f97e809 100644
--- a/content/docs/zh-CN/next/client-libraries-java/index.html
+++ b/content/docs/zh-CN/next/client-libraries-java/index.html
@@ -139,12 +139,16 @@ dependencies {
<p>如果你使用<a
href="/docs/zh-CN/next/standalone">单机模式</a>运行一个集群,broker将默认使用<code>pulsar://localhost:6650</code></p>
</blockquote>
<p>If you create a client, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
-<p>| Type | Name | Description | Default |---|---|---|--- String |
<code>serviceUrl</code> |Service URL provider for Pulsar service | None String
| <code>authPluginClassName</code> | Name of the authentication plugin | None
String | <code>authParams</code> | String represents parameters for the
authentication plugin<br>
-<strong>Example</strong> <br>
-key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info<br>
-Stats is activated with positive <code>statsInterval</code> <br>
-<code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustCert [...]
-If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
+<p>| Type | Name |</p>
+<div style="width:260px">
+ 说明:
+</div>
+<p>| Default |---|---|---|--- String | <code>serviceUrl</code> |Service URL
provider for Pulsar service | None String | <code>authPluginClassName</code> |
Name of the authentication plugin | None String | <code>authParams</code> |
String represents parameters for the authentication plugin</p>
+<p><strong>Example</strong> <br>
+key1:val1,key2:val2|None long|<code>operationTimeoutMs</code>|Operation
timeout |30000 long|<code>statsIntervalSeconds</code>|Interval between each
stat info</p>
+<p>Stats is activated with positive <code>statsInterval</code></p>
+<p><code>statsIntervalSeconds</code> should be set to 1 second at least |60
int|<code>numIoThreads</code>| Number of threads used for handling connections
to brokers | 1 int|<code>numListenerThreads</code>|Number of threads used for
handling message listeners | 1 boolean|<code>useTcpNoDelay</code>|Whether to
use TCP no-delay flag on the connection to disable Nagle algorithm |true
boolean |<code>useTls</code> |Whether to use TLS encryption on the connection|
false string | <code>tlsTrustC [...]
+<p>If the duration passes without a response from a broker, the connection
attempt is dropped|10000 int|<code>requestTimeoutMs</code>|Maximum duration for
completing a request |60000 int|<code>defaultBackoffIntervalNanos</code>|
Default duration for a backoff interval | TimeUnit.MILLISECONDS.toNanos(100);
long|<code>maxBackoffIntervalNanos</code>|Maximum duration for a backoff
interval|TimeUnit.SECONDS.toNanos(30)</p>
<p>完整的配置参数列表参考 <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/PulsarClient">PulsarClient</a>
类的javadoc文档 。</p>
<blockquote>
@@ -246,7 +250,80 @@ client.close();</p>
}
</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.09 [...]
-<p>如果实例化 <code>消费者</code> 对象, 仅指定主题和订阅名称, 如上面的示例所示, 消费者将采用默认配置。 要使用非默认配置,
你可以设置多种可配置的参数。 有关完整列表, 请参阅 <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
+<p>如果实例化 <code>消费者</code> 对象, 仅指定主题和订阅名称, 如上面的示例所示, 消费者将采用默认配置。</p>
+<p>If you create a consumer, you may use the <code>loadConf</code>
configuration. Below are the available parameters used in
<code>loadConf</code>.</p>
+<p>Type | Name|</p>
+<div style="width:300px">
+ 说明:
+</div>
+<p>| Default |---|---|---|--- Set<String>| <code>topicNames</code>| Topic
name| Sets.newTreeSet() Pattern| <code>topicsPattern</code>| Topic pattern
|None String| <code>subscriptionName</code>| Subscription name| None
SubscriptionType| <code>subscriptionType</code>| Subscription type</p>
+<p>There are three subscription types:</p>
+<ul>
+<li>Exclusive</li>
+<li>Failover(灾备)</li>
+<li>Shared(共享)|SubscriptionType.Exclusive int |
+<code>receiverQueueSize</code> | Size of a consumer's receiver queue.</li>
+</ul>
+<p>For example, the number of messages that can be accumulated by a consumer
before an application calls <code>Receive</code>.</p>
+<p>A value higher than the default value increases consumer throughput, though
at the expense of more memory utilization.| 1000
long|<code>acknowledgementsGroupTimeMicros</code>|Group a consumer
acknowledgment for a specified time.</p>
+<p>By default, a consumer uses 100ms grouping time to send out acknowledgments
to a broker.</p>
+<p>Setting a group time of 0 sends out acknowledgments immediately.</p>
+<p>A longer ack group time is more efficient at the expense of a slight
increase in message re-deliveries after a
failure.|TimeUnit.MILLISECONDS.toMicros(100)
long|<code>negativeAckRedeliveryDelayMicros</code>|Delay to wait before
redelivering messages that have failed to be process.</p>
+<p>When an application uses {@link Consumer#negativeAcknowledge(Message)},
failed messages are redelivered after a fixed timeout.
|TimeUnit.MINUTES.toMicros(1) int
|<code>maxTotalReceiverQueueSizeAcrossPartitions</code>|Max total receiver
queue size across partitions.</p>
+<p>This setting reduces the receiver queue size for individual partitions if
the total receiver queue size exceeds this value.|50000
String|<code>consumerName</code>|Consumer name|null
long|<code>ackTimeoutMillis</code>|Timeout of unacked messages|0
long|<code>tickDurationMillis</code>|Granularity of the ack-timeout
redelivery.</p>
+<p>Using an higher <code>tickDurationMillis</code> reduces the memory overhead
to track messages when the ack-timeout is set to a bigger value (for example, 1
hour).|1000 int|<code>priorityLevel</code>|Priority level for a consumer to
which a broker gives more priority while dispatching messages in the shared
subscription mode.</p>
+<p>Here, the broker follows descending priorities. For example,
0=max-priority, 1, 2,...</p>
+<p>In the shared subscription mode, the broker <strong>first dispatches
messages to the max priority level consumers if they have permits</strong>.
Otherwise, the broker considers next priority level consumers.</p>
+<p><strong>Example 1</strong></p>
+<p>If a subscription has consumerA with <code>priorityLevel</code> 0 and
consumerB with <code>priorityLevel</code> 1, then the broker <strong>only
dispatches messages to consumerA until it runs out permits</strong> and then
starts dispatching messages to consumerB.</p>
+<p><strong>Example 2</strong></p>
+<p>Consumer Priority, Level, Permits<br>
+C1, 0, 2<br>
+C2, 0, 1<br>
+C3, 0, 1<br>
+C4, 1, 2<br>
+C5, 1, 1</p>
+<p>Order in which a broker dispatches messages to consumers is: C1, C2, C3,
C1, C4, C5, C4.|0
ConsumerCryptoFailureAction|<code>cryptoFailureAction</code>|Consumer should
take action when it receives a message that can not decrypt.</p>
+<ul>
+<li><strong>FAIL</strong>: this is the default option to fail messages until
crypto succeeds.</li>
+</ul>
+<ul>
+<li><strong>DISCARD</strong>: message is silently acknowledged and not
delivered to an application.</li>
+</ul>
+<ul>
+<li><p><strong>CONSUME</strong>: deliver encrypted messages to applications.
It is the application's responsibility to decrypt the message.</p>
+<p>If message are compressed, the decompression fails.</p>
+<p>If messages contain batch messages, a client is not be able to retrieve
individual messages in batch.</p>
+<p>Delivered encrypted message contains {@link EncryptionContext} which
contains encryption and compression information in it using which application
can decrypt consumed message payload.|<a
href="http://ConsumerCryptoFailureAction.FAIL">ConsumerCryptoFailureAction.FAIL</a>
SortedMap<String, String>|
+<code>properties</code>|A name or value property of this consumer.</p></li>
+</ul>
+<p><code>properties</code> is application defined metadata that can be
attached to a consumer.</p>
+<p>When getting a topic stats, this metadata is associated to the consumer
stats for easier identification.|new TreeMap<>()
boolean|<code>readCompacted</code>|If <code>readCompacted</code> is enabled, a
consumer reads messages from a compacted topic rather than reading a full
message backlog of a topic.</p>
+<p>This means if a topic has been compacted, a consumer only see the latest
value for each key in the topic, up until the point in the topic message when
backlog that has been compacted. Beyond that point, the messages are sent as
normal.</p>
+<p><code>readCompacted</code> can only be enabled on subscriptions to
persistent topics, which have a single active consumer (for example, failure or
exclusive subscriptions).</p>
+<p>Attempting to enable it on subscriptions to non-persistent topics or on
shared subscriptions leads to a subscription call throwing a
<code>PulsarClientException</code>.|false
SubscriptionInitialPosition|<code>subscriptionInitialPosition</code>|Initial
position at which to set cursor when subscribing to a topic at first
time.|SubscriptionInitialPosition.Latest
int|<code>patternAutoDiscoveryPeriod</code>|Topic auto discovery period when
using a pattern for topic's consumer.</p>
+<p>The default and minimum value is 1 minute.|1
RegexSubscriptionMode|<code>regexSubscriptionMode</code>|When subscribing to a
topic using a regular expression, you can pick a certain type of topics.</p>
+<ul>
+<li><strong>PersistentOnly</strong>: only subscribe to persistent topics.</li>
+</ul>
+<ul>
+<li><strong>NonPersistentOnly</strong>: only subscribe to non-persistent
topics.</li>
+</ul>
+<ul>
+<li><strong>AllTopics</strong>: subscribe to both persistent and
non-persistent topics.|RegexSubscriptionMode.PersistentOnly DeadLetterPolicy|
+<code>deadLetterPolicy</code>|Dead letter policy for consumers.</li>
+</ul>
+<p>By default, some messages are redelivered many times possible, even to the
extent that it can be never stop.</p>
+<p>By using the dead letter mechanism, messages have the max redelivery count.
<strong>When message exceeding the maximum number of redeliveries, messages are
sent to the Dead Letter Topic and acknowledged automatically</strong>.</p>
+<p>You can enable the dead letter mechanism by setting
<code>deadLetterPolicy</code>.</p>
+<p><strong>Example</strong></p>
+<p><code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).build())<br/>.subscribe();</code></p>
+<p>Default dead letter topic name is
<code>{TopicName}-{Subscription}-DLQ</code>.</p>
+<p>To set a custom dead letter topic name:<br>
+<code>client.newConsumer()<br/>.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10)<br/>.deadLetterTopic("your-topic-name").build())<br/>.subscribe();</code></p>
+<p>When the dead letter policy is specified and no
<code>ackTimeoutMillis</code> is specified, then the ack timeout is set to
30000 millisecond.|None boolean|<code>autoUpdatePartitions</code>|If
<code>autoUpdatePartitions</code> is enabled, a consumer subscribes to
partition increasement automatically.</p>
+<p><strong>Note</strong>: this is only for partitioned consumers.|true
boolean|<code>replicateSubscriptionState</code>|If
<code>replicateSubscriptionState</code> is enabled, a subscription state is
replicated to geo-replicated clusters.|false</p>
+<p>要使用非默认配置, 你可以设置多种可配置的参数。 有关完整列表, 请参阅 <a
href="https://pulsar.incubator.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder">ConsumerBuilder</a>
类javadoc文档。 下面是一个示例:</p>
<p>这是一个示例配置:</p>
<pre><code class="hljs css language-java">Consumer consumer =
client.newConsumer()
diff --git a/content/swagger/2.5.0-SNAPSHOT/swagger.json
b/content/swagger/2.5.0-SNAPSHOT/swagger.json
index 23d03e4..16f1364 100644
--- a/content/swagger/2.5.0-SNAPSHOT/swagger.json
+++ b/content/swagger/2.5.0-SNAPSHOT/swagger.json
@@ -4784,7 +4784,7 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/TopicStats"
+ "$ref" : "#/definitions/NonPersistentTopicStats"
}
},
"401" : {
@@ -8866,19 +8866,19 @@
"type" : "number",
"format" : "double"
},
- "bandwidthIn" : {
+ "cpu" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "bandwidthOut" : {
+ "memory" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "memory" : {
+ "directMemory" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "cpu" : {
+ "bandwidthIn" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "directMemory" : {
+ "bandwidthOut" : {
"$ref" : "#/definitions/ResourceUsage"
},
"lastUpdate" : {
@@ -8889,10 +8889,6 @@
"type" : "number",
"format" : "double"
},
- "msgThroughputOut" : {
- "type" : "number",
- "format" : "double"
- },
"underLoaded" : {
"type" : "boolean"
},
@@ -8901,6 +8897,10 @@
},
"loadReportType" : {
"type" : "string"
+ },
+ "msgThroughputOut" : {
+ "type" : "number",
+ "format" : "double"
}
}
},
@@ -9068,13 +9068,13 @@
"type" : "number",
"format" : "double"
},
- "connectedSince" : {
+ "producerName" : {
"type" : "string"
},
- "clientVersion" : {
+ "connectedSince" : {
"type" : "string"
},
- "producerName" : {
+ "clientVersion" : {
"type" : "string"
},
"address" : {
@@ -9743,13 +9743,13 @@
"type" : "string"
}
},
- "connectedSince" : {
+ "producerName" : {
"type" : "string"
},
- "clientVersion" : {
+ "connectedSince" : {
"type" : "string"
},
- "producerName" : {
+ "clientVersion" : {
"type" : "string"
},
"address" : {
diff --git a/content/swagger/2.5.0-SNAPSHOT/swaggerfunctions.json
b/content/swagger/2.5.0-SNAPSHOT/swaggerfunctions.json
index cc9c6c2..02dfa12 100644
--- a/content/swagger/2.5.0-SNAPSHOT/swaggerfunctions.json
+++ b/content/swagger/2.5.0-SNAPSHOT/swaggerfunctions.json
@@ -1348,9 +1348,6 @@
"Message" : {
"type" : "object",
"properties" : {
- "replicatedFrom" : {
- "type" : "string"
- },
"replicated" : {
"type" : "boolean"
},
@@ -1362,19 +1359,6 @@
"type" : "integer",
"format" : "int64"
},
- "topicName" : {
- "type" : "string"
- },
- "producerName" : {
- "type" : "string"
- },
- "messageId" : {
- "$ref" : "#/definitions/MessageId"
- },
- "sequenceId" : {
- "type" : "integer",
- "format" : "int64"
- },
"keyBytes" : {
"type" : "array",
"items" : {
@@ -1382,6 +1366,13 @@
"format" : "byte"
}
},
+ "encryptionCtx" : {
+ "$ref" : "#/definitions/EncryptionContext"
+ },
+ "sequenceId" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
"orderingKey" : {
"type" : "array",
"items" : {
@@ -1389,8 +1380,8 @@
"format" : "byte"
}
},
- "encryptionCtx" : {
- "$ref" : "#/definitions/EncryptionContext"
+ "messageId" : {
+ "$ref" : "#/definitions/MessageId"
},
"redeliveryCount" : {
"type" : "integer",
@@ -1403,6 +1394,15 @@
"format" : "byte"
}
},
+ "topicName" : {
+ "type" : "string"
+ },
+ "replicatedFrom" : {
+ "type" : "string"
+ },
+ "producerName" : {
+ "type" : "string"
+ },
"data" : {
"type" : "array",
"items" : {
diff --git a/content/swagger/master/swagger.json
b/content/swagger/master/swagger.json
index 23d03e4..16f1364 100644
--- a/content/swagger/master/swagger.json
+++ b/content/swagger/master/swagger.json
@@ -4784,7 +4784,7 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/TopicStats"
+ "$ref" : "#/definitions/NonPersistentTopicStats"
}
},
"401" : {
@@ -8866,19 +8866,19 @@
"type" : "number",
"format" : "double"
},
- "bandwidthIn" : {
+ "cpu" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "bandwidthOut" : {
+ "memory" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "memory" : {
+ "directMemory" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "cpu" : {
+ "bandwidthIn" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "directMemory" : {
+ "bandwidthOut" : {
"$ref" : "#/definitions/ResourceUsage"
},
"lastUpdate" : {
@@ -8889,10 +8889,6 @@
"type" : "number",
"format" : "double"
},
- "msgThroughputOut" : {
- "type" : "number",
- "format" : "double"
- },
"underLoaded" : {
"type" : "boolean"
},
@@ -8901,6 +8897,10 @@
},
"loadReportType" : {
"type" : "string"
+ },
+ "msgThroughputOut" : {
+ "type" : "number",
+ "format" : "double"
}
}
},
@@ -9068,13 +9068,13 @@
"type" : "number",
"format" : "double"
},
- "connectedSince" : {
+ "producerName" : {
"type" : "string"
},
- "clientVersion" : {
+ "connectedSince" : {
"type" : "string"
},
- "producerName" : {
+ "clientVersion" : {
"type" : "string"
},
"address" : {
@@ -9743,13 +9743,13 @@
"type" : "string"
}
},
- "connectedSince" : {
+ "producerName" : {
"type" : "string"
},
- "clientVersion" : {
+ "connectedSince" : {
"type" : "string"
},
- "producerName" : {
+ "clientVersion" : {
"type" : "string"
},
"address" : {
diff --git a/content/swagger/master/swaggerfunctions.json
b/content/swagger/master/swaggerfunctions.json
index cc9c6c2..02dfa12 100644
--- a/content/swagger/master/swaggerfunctions.json
+++ b/content/swagger/master/swaggerfunctions.json
@@ -1348,9 +1348,6 @@
"Message" : {
"type" : "object",
"properties" : {
- "replicatedFrom" : {
- "type" : "string"
- },
"replicated" : {
"type" : "boolean"
},
@@ -1362,19 +1359,6 @@
"type" : "integer",
"format" : "int64"
},
- "topicName" : {
- "type" : "string"
- },
- "producerName" : {
- "type" : "string"
- },
- "messageId" : {
- "$ref" : "#/definitions/MessageId"
- },
- "sequenceId" : {
- "type" : "integer",
- "format" : "int64"
- },
"keyBytes" : {
"type" : "array",
"items" : {
@@ -1382,6 +1366,13 @@
"format" : "byte"
}
},
+ "encryptionCtx" : {
+ "$ref" : "#/definitions/EncryptionContext"
+ },
+ "sequenceId" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
"orderingKey" : {
"type" : "array",
"items" : {
@@ -1389,8 +1380,8 @@
"format" : "byte"
}
},
- "encryptionCtx" : {
- "$ref" : "#/definitions/EncryptionContext"
+ "messageId" : {
+ "$ref" : "#/definitions/MessageId"
},
"redeliveryCount" : {
"type" : "integer",
@@ -1403,6 +1394,15 @@
"format" : "byte"
}
},
+ "topicName" : {
+ "type" : "string"
+ },
+ "replicatedFrom" : {
+ "type" : "string"
+ },
+ "producerName" : {
+ "type" : "string"
+ },
"data" : {
"type" : "array",
"items" : {