You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by rd...@apache.org on 2022/04/24 03:12:19 UTC

[pulsar] branch master updated: add doc for how to configure chunking for readers (#15211)

This is an automated email from the ASF dual-hosted git repository.

rdhabalia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 3823ddf89cc add doc for how to configure chunking for readers (#15211)
3823ddf89cc is described below

commit 3823ddf89cc22f14f5f994ea030bd365d58d28b3
Author: momo-jun <60...@users.noreply.github.com>
AuthorDate: Sun Apr 24 11:12:13 2022 +0800

    add doc for how to configure chunking for readers (#15211)
---
 site2/docs/client-libraries-java.md | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/site2/docs/client-libraries-java.md b/site2/docs/client-libraries-java.md
index e640b33216a..13205461f74 100644
--- a/site2/docs/client-libraries-java.md
+++ b/site2/docs/client-libraries-java.md
@@ -1123,6 +1123,22 @@ pulsarClient.newReader()
 Total hash range size is 65536, so the max end of the range should be less than or equal to 65535.
 
 
+### Configure chunking
+
+Configuring chuncking for readers is similar to that for consumers. See [configure chunking for consumers](#configure-chunking) for more information.
+
+The following is an example of how to configure message chunking for a reader.
+
+```java
+Reader<byte[]> reader = pulsarClient.newReader()
+        .topic(topicName)
+        .startMessageId(MessageId.earliest)
+        .maxPendingChunkedMessage(12)
+        .autoAckOldestChunkedMessageOnQueueFull(true)
+        .expireTimeOfIncompleteChunkedMessage(12, TimeUnit.MILLISECONDS)
+        .create();
+```
+
 ## TableView
 
 The TableView interface serves an encapsulated access pattern, providing a continuously updated key-value map view of the compacted topic data. Messages without keys will be ignored.