feat(pubsub): add resilient parallel streaming pull - #339
Open
sigurdm wants to merge 1 commit into
Open
Conversation
This was referenced Sep 7, 2026
Contributor
Author
|
/gcbrun |
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces background batching and retrying of acknowledgments and deadline modifications for Pub/Sub subscriptions, along with support for parallel streaming pull connections and automatic reconnection handling. The review feedback highlights an improvement opportunity in Subscription.close(), advising against manually invoking StreamController.onCancel as it is a Dart anti-pattern, and suggests refactoring the teardown process to explicitly manage active teardown functions instead.
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 07:20
0727b4e to
6bf0f6c
Compare
Contributor
Author
|
/gcbrun |
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
2 times, most recently
from
September 8, 2026 09:32
b6636dd to
6199bc4
Compare
Contributor
Author
|
/gcbrun |
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 10:54
6199bc4 to
f4341ff
Compare
Contributor
Author
|
/gcbrun |
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 11:05
f4341ff to
020f962
Compare
Contributor
Author
|
/gcbrun |
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
2 times, most recently
from
September 8, 2026 11:22
c598d07 to
879affe
Compare
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 11:58
879affe to
4118dd3
Compare
sigurdm
changed the base branch from
pubsub-topic-batching
to
pubsub-retry-batching
September 8, 2026 12:02
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 12:08
4118dd3 to
c0c4cb2
Compare
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 12:36
c0c4cb2 to
6851ab5
Compare
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 13:09
6851ab5 to
3be95a9
Compare
Add resilient multi-stream parallel Subscription.streamingPull (maxConcurrentStreams) with automatic exponential backoff reconnection, backpressure pause/resume forwarding, idle connection recovery, streamingPullWithStream on PubSub, and routing of batched acknowledgments and deadline modifications directly over active streaming channels.
sigurdm
force-pushed
the
pubsub-streaming-pull
branch
from
September 8, 2026 14:28
3be95a9 to
1e0188d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is Part 2 of 2 in a stacked set of PRs:
pubsub-retry-batching)pubsub-streaming-pull)Key Features
Subscription.streamingPullwith configurablemaxConcurrentStreamsfor parallel streaming pull connections multiplexed into a single stream.hasReceivedItem).await forloops.Subscription.acknowledgeandmodifyAckDeadlineare automatically routed over active bidirectional streaming pull channels instead of separate unary RPCs.PubSub.streamingPullWithStreamfor streaming pull over an explicit request stream with bidirectional communication and clean controller teardown.Subscription.close(), flushes batchers over active stream controllers and awaits request stream close before cancelling response stream subscriptions, guaranteeing flushed ACKs and deadline modifications are transmitted before stream termination.requestController.addin client handlers againstStateErrorduring concurrent close.onListento prevent leaks on unlistened streams.example/doc_examples.dartdemonstrating long-lived streaming pull and graceful shutdown.README.mdandCHANGELOG.md.