This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git
The following commit(s) were added to refs/heads/main by this push:
new 2a8819d Add documents for the batching arguments when creating
producer (#205)
2a8819d is described below
commit 2a8819def9a2b5eebdd6c2260ff3cbad6f0b1ef1
Author: Yunze Xu <[email protected]>
AuthorDate: Thu Mar 21 17:00:05 2024 +0800
Add documents for the batching arguments when creating producer (#205)
---
pulsar/__init__.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/pulsar/__init__.py b/pulsar/__init__.py
index a46c209..9590fa3 100644
--- a/pulsar/__init__.py
+++ b/pulsar/__init__.py
@@ -670,6 +670,20 @@ class Client:
SNAPPY is supported since Pulsar 2.4. Consumers will need to be at
least at that release in order to
be able to receive messages compressed with SNAPPY.
+ batching_enabled: bool, default=False
+ When automatic batching is enabled, multiple calls to `send` can
result in a single batch to be sent to the
+ broker, leading to better throughput, especially when publishing
small messages.
+ All messages in a batch will be published as a single batched
message. The consumer will be delivered
+ individual messages in the batch in the same order they were
enqueued.
+ batching_max_messages: int, default=1000
+ When you set this option to a value greater than 1, messages are
queued until this threshold or
+ `batching_max_allowed_size_in_bytes` is reached or batch interval
has elapsed.
+ batching_max_allowed_size_in_bytes: int, default=128*1024
+ When you set this option to a value greater than 1, messages are
queued until this threshold or
+ `batching_max_messages` is reached or batch interval has elapsed.
+ batching_max_publish_delay_ms: int, default=10
+ The batch interval in milliseconds. Queued messages will be sent
in batch after this interval even if both
+ the threshold of `batching_max_messages` and
`batching_max_allowed_size_in_bytes` are not reached.
max_pending_messages: int, default=1000
Set the max size of the queue holding the messages pending to
receive an acknowledgment from the broker.
max_pending_messages_across_partitions: int, default=50000