-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pubsub: make poll wait for messages #2112
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
Conversation
Instead of returning immediately if no messages are available, poll now waits for messages. Fixes #2108.
davidtorres
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
| PullRequest.newBuilder() | ||
| .setSubscription(subscription) | ||
| .setMaxMessages(maxDesiredPulledMessages) | ||
| .build()); |
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.
| new FutureCallback<PullResponse>() { | ||
| @Override | ||
| public void onSuccess(PullResponse pullResponse) { | ||
| if (pullResponse.getReceivedMessagesCount() == 0) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@davidtorres PTAL |
|
Changes Unknown when pulling ce47990 on pongad:pull-wait into ** on GoogleCloudPlatform:master**. |
|
LGTM - this seems to fulfill the requested change. |
Instead of returning immediately if no messages are available,
poll now waits for messages.
Fixes #2108.
@davidtorres @haakonringberg