Skip to content

Adding pause/resume to Pub / Sub consumer. - #4558

Merged
dhermes merged 2 commits into
googleapis:masterfrom
dhermes:pubsub-consumer-pause
Dec 8, 2017
Merged

dhermes merged 2 commits into
googleapis:masterfrom
dhermes:pubsub-consumer-pause

Conversation

@dhermes

@dhermes dhermes commented Dec 8, 2017

Copy link
Copy Markdown
Contributor

Using these (rather then open/close on the subscription Policy) when the flow control signals the message load is too great.

Using these (rather then open/close on the subscription Policy)
when the flow control signals the message load is too great.
@dhermes dhermes added the api: pubsub Issues related to the Pub/Sub API. label Dec 8, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 8, 2017
thread.join()


def _pausable_iterator(iterator, can_continue):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

if self._load >= 1.0:
self._paused = True
self.close()
self._consumer.pause()

This comment was marked as spam.

This comment was marked as spam.

@dhermes
dhermes merged commit 9ef8334 into googleapis:master Dec 8, 2017
@dhermes
dhermes deleted the pubsub-consumer-pause branch December 8, 2017 22:49
parthea pushed a commit that referenced this pull request Mar 2, 2026
Using these (rather then open/close on the subscription Policy)
when the flow control signals the message load is too great.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants