You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2024/10/31 08:36:27 UTC
(pulsar-site) branch main updated: Update client-libraries-java-use.md (#915)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new e542696919f1 Update client-libraries-java-use.md (#915)
e542696919f1 is described below
commit e542696919f11322d61e58ab2003f0996acf199a
Author: Jiajun-Peng <12...@users.noreply.github.com>
AuthorDate: Thu Oct 31 16:36:22 2024 +0800
Update client-libraries-java-use.md (#915)
* Update client-libraries-java-use.md
Remove redundancy
- Removed the redundant sentence
- The removed sentence and the following one are redundant in meaning.
- Retained the second sentence for clarity and specificity.
* Apply changes to docs
* Apply to other versions
---------
Co-authored-by: Lari Hotari <lh...@users.noreply.github.com>
---
docs/client-libraries-java-use.md | 4 ++--
versioned_docs/version-3.0.x/client-libraries-java-use.md | 4 ++--
versioned_docs/version-3.3.x/client-libraries-java-use.md | 4 ++--
versioned_docs/version-4.0.x/client-libraries-java-use.md | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/docs/client-libraries-java-use.md b/docs/client-libraries-java-use.md
index 9d692e508dfa..02dfc4f15039 100644
--- a/docs/client-libraries-java-use.md
+++ b/docs/client-libraries-java-use.md
@@ -80,7 +80,7 @@ while (true) {
}
```
-If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` uses a thread pool inside the client. You can set the number of threads for message listeners in the ClientBuilder. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
+If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
```java
MessageListener myMessageListener = (consumer, msg) -> {
@@ -121,4 +121,4 @@ while (true) {
In the example above, a `Reader` object is instantiated for a specific topic and message (by ID); the reader iterates over each message in the topic after the message is identified by `msgIdBytes` (how that value is obtained depends on the application).
-The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
\ No newline at end of file
+The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
diff --git a/versioned_docs/version-3.0.x/client-libraries-java-use.md b/versioned_docs/version-3.0.x/client-libraries-java-use.md
index 1d9fea6e0fa0..137ad035c5d9 100644
--- a/versioned_docs/version-3.0.x/client-libraries-java-use.md
+++ b/versioned_docs/version-3.0.x/client-libraries-java-use.md
@@ -79,7 +79,7 @@ while (true) {
}
```
-If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` uses a thread pool inside the client. You can set the number of threads for message listeners in the ClientBuilder. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
+If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
```java
MessageListener myMessageListener = (consumer, msg) -> {
@@ -120,4 +120,4 @@ while (true) {
In the example above, a `Reader` object is instantiated for a specific topic and message (by ID); the reader iterates over each message in the topic after the message is identified by `msgIdBytes` (how that value is obtained depends on the application).
-The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
\ No newline at end of file
+The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
diff --git a/versioned_docs/version-3.3.x/client-libraries-java-use.md b/versioned_docs/version-3.3.x/client-libraries-java-use.md
index 9d692e508dfa..02dfc4f15039 100644
--- a/versioned_docs/version-3.3.x/client-libraries-java-use.md
+++ b/versioned_docs/version-3.3.x/client-libraries-java-use.md
@@ -80,7 +80,7 @@ while (true) {
}
```
-If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` uses a thread pool inside the client. You can set the number of threads for message listeners in the ClientBuilder. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
+If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
```java
MessageListener myMessageListener = (consumer, msg) -> {
@@ -121,4 +121,4 @@ while (true) {
In the example above, a `Reader` object is instantiated for a specific topic and message (by ID); the reader iterates over each message in the topic after the message is identified by `msgIdBytes` (how that value is obtained depends on the application).
-The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
\ No newline at end of file
+The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
diff --git a/versioned_docs/version-4.0.x/client-libraries-java-use.md b/versioned_docs/version-4.0.x/client-libraries-java-use.md
index 9d692e508dfa..02dfc4f15039 100644
--- a/versioned_docs/version-4.0.x/client-libraries-java-use.md
+++ b/versioned_docs/version-4.0.x/client-libraries-java-use.md
@@ -80,7 +80,7 @@ while (true) {
}
```
-If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` uses a thread pool inside the client. You can set the number of threads for message listeners in the ClientBuilder. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
+If you don't want to block your main thread but constantly listen for new messages, consider using a `MessageListener`. The `MessageListener` will use a thread pool inside the PulsarClient. You can set the number of threads to use for message listeners in the ClientBuilder.
```java
MessageListener myMessageListener = (consumer, msg) -> {
@@ -121,4 +121,4 @@ while (true) {
In the example above, a `Reader` object is instantiated for a specific topic and message (by ID); the reader iterates over each message in the topic after the message is identified by `msgIdBytes` (how that value is obtained depends on the application).
-The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.
\ No newline at end of file
+The code sample above shows pointing the `Reader` object to a specific message (by ID), but you can also use `MessageId.earliest` to point to the earliest available message on the topic of `MessageId.latest` to point to the most recent available message.