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 039ffb36f871 [improve]Improve batching message doc (#878)
039ffb36f871 is described below
commit 039ffb36f87102a9cbaa5d12608dde1234cab567
Author: 道君 <[email protected]>
AuthorDate: Thu Oct 31 16:45:39 2024 +0800
[improve]Improve batching message doc (#878)
* Improve batching message doc
* dismiss format changes
* Update doc
* dismiss format changes
* Revert changes in versioned_docs
* Fix grammar and improve clarity
* Apply to versioned_docs
---------
Co-authored-by: Lari Hotari <[email protected]>
---
docs/concepts-messaging.md | 5 +++++
versioned_docs/version-3.0.x/concepts-messaging.md | 5 +++++
versioned_docs/version-3.3.x/concepts-messaging.md | 5 +++++
versioned_docs/version-4.0.x/concepts-messaging.md | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/docs/concepts-messaging.md b/docs/concepts-messaging.md
index 3885ae7bb13c..53864e8d8576 100644
--- a/docs/concepts-messaging.md
+++ b/docs/concepts-messaging.md
@@ -429,6 +429,11 @@ Consumer<byte[]> consumer = pulsarClient.newConsumer()
.subscribe();
```
+:::note
+
+When using the synchronous `send` method for producing messages, the batch
will be sent immediately even if it is not full. This helps reduce message
sending latency and prevents blocking of the caller's thread. When producing
messages in a single thread, you should use the asynchronous `sendAsync` method
to send messages in batches.
+
+:::
### Chunking
Message chunking enables Pulsar to process large payload messages by splitting
the message into chunks at the producer side and aggregating chunked messages
at the consumer side.
diff --git a/versioned_docs/version-3.0.x/concepts-messaging.md
b/versioned_docs/version-3.0.x/concepts-messaging.md
index 2f559bdb006b..924a455b6af9 100644
--- a/versioned_docs/version-3.0.x/concepts-messaging.md
+++ b/versioned_docs/version-3.0.x/concepts-messaging.md
@@ -415,6 +415,11 @@ Consumer<byte[]> consumer = pulsarClient.newConsumer()
.subscribe();
```
+:::note
+
+When using the synchronous `send` method for producing messages, the batch
will be sent immediately even if it is not full. This helps reduce message
sending latency and prevents blocking of the caller's thread. When producing
messages in a single thread, you should use the asynchronous `sendAsync` method
to send messages in batches.
+
+:::
### Chunking
Message chunking enables Pulsar to process large payload messages by splitting
the message into chunks at the producer side and aggregating chunked messages
at the consumer side.
diff --git a/versioned_docs/version-3.3.x/concepts-messaging.md
b/versioned_docs/version-3.3.x/concepts-messaging.md
index 81ba7ba2bab9..4d00ad73b40a 100644
--- a/versioned_docs/version-3.3.x/concepts-messaging.md
+++ b/versioned_docs/version-3.3.x/concepts-messaging.md
@@ -427,6 +427,11 @@ Consumer<byte[]> consumer = pulsarClient.newConsumer()
.subscribe();
```
+:::note
+
+When using the synchronous `send` method for producing messages, the batch
will be sent immediately even if it is not full. This helps reduce message
sending latency and prevents blocking of the caller's thread. When producing
messages in a single thread, you should use the asynchronous `sendAsync` method
to send messages in batches.
+
+:::
### Chunking
Message chunking enables Pulsar to process large payload messages by splitting
the message into chunks at the producer side and aggregating chunked messages
at the consumer side.
diff --git a/versioned_docs/version-4.0.x/concepts-messaging.md
b/versioned_docs/version-4.0.x/concepts-messaging.md
index be32879e8fb6..5d041418d75e 100644
--- a/versioned_docs/version-4.0.x/concepts-messaging.md
+++ b/versioned_docs/version-4.0.x/concepts-messaging.md
@@ -427,6 +427,11 @@ Consumer<byte[]> consumer = pulsarClient.newConsumer()
.subscribe();
```
+:::note
+
+When using the synchronous `send` method for producing messages, the batch
will be sent immediately even if it is not full. This helps reduce message
sending latency and prevents blocking of the caller's thread. When producing
messages in a single thread, you should use the asynchronous `sendAsync` method
to send messages in batches.
+
+:::
### Chunking
Message chunking enables Pulsar to process large payload messages by splitting
the message into chunks at the producer side and aggregating chunked messages
at the consumer side.