Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Dec 8, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Dec 8, 2017

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
@@ -392,3 +425,27 @@ def stop_consuming(self):
"""
thread = self._stop_no_join()
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.

@@ -291,7 +291,7 @@ def lease(self, ack_id, byte_size):
# If we do, we need to stop the stream.
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.

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