Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ class StreamingPullManager(object):
``projects/{project}/subscriptions/{subscription}``.
flow_control (~google.cloud.pubsub_v1.types.FlowControl): The flow
control settings.
use_legacy_flow_control (bool): Disables enforcing flow control settings
at the Cloud PubSub server and uses the less accurate method of only
enforcing flow control at the client side.
use_legacy_flow_control (bool):
Comment thread
plamut marked this conversation as resolved.
If set to ``True``, flow control at the Cloud Pub/Sub server is disabled,
though client-side flow control is still enabled. If set to ``False``
(default), both server-side and client-side flow control are enabled.
scheduler (~google.cloud.pubsub_v1.scheduler.Scheduler): The scheduler
to use to process messages. If not provided, a thread pool-based
scheduler will be used.
Expand Down
8 changes: 6 additions & 2 deletions google/cloud/pubsub_v1/subscriber/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def subscribe(
a long time to process.

The ``use_legacy_flow_control`` argument disables enforcing flow control
settings at the Cloud PubSub server and uses the less accurate method of
only enforcing flow control at the client side.
settings at the Cloud Pub/Sub server, and only the client side flow control
will be enforced.

This method starts the receiver in the background and returns a
*Future* representing its execution. Waiting on the future (calling
Expand Down Expand Up @@ -200,6 +200,10 @@ def callback(message):
*scheduler* to use when executing the callback. This controls
how callbacks are executed concurrently. This object must not be shared
across multiple SubscriberClients.
use_legacy_flow_control (bool):
If set to ``True``, flow control at the Cloud Pub/Sub server is disabled,
though client-side flow control is still enabled. If set to ``False``
(default), both server-side and client-side flow control are enabled.
await_callbacks_on_shutdown (bool):
If ``True``, after canceling the returned future, the latter's
``result()`` method will block until the background stream and its
Expand Down