-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
Using these (rather then open/close on the subscription Policy) when the flow control signals the message load is too great.
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Using these (rather then open/close on the subscription Policy) when the flow control signals the message load is too great.