feat(pubsub): add support for streaming pull keepalives from the server - #7819
Conversation
| this.emit('data', data); | ||
| } | ||
|
|
||
| private _resetPingTimer(index: number): void { |
There was a problem hiding this comment.
I haven't thought about the exact practical differences between what's written here and what's in the Java client, but I think we should probably just mimic the behavior of the latter.
There was a problem hiding this comment.
This is updated now. Take a look?
|
We're not proceeding with this for now. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces server keepalive support in MessageStream by setting the protocol version and client ID, tracking ping/response times, and adding tests. The feedback suggests optimizing the keepalive mechanism by replacing the setInterval polling with a precise setTimeout triggered on pings, reusing the _clearAliveTimer helper to reduce duplication, avoiding starting the timer prematurely on initial connection, and updating the unit tests accordingly.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…#8845) * feat(pubsub): add support for streaming pull keepalives from the server (#7819) * feat(pubsub): add support for streaming pull keepalives from the server * feat(pubsub): update algorithm to match Java impl * fix(pubsub): correct clientId value * chore: improve comment * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: accept gemini suggestion for setTimeout * fix: accept gemini suggestion * fix: accept gemini suggestion Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix: accept gemini suggestion * fix: accept gemini test suggestion * fix: pull timeout into a constant --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * chore(main): release projectify 5.1.0 (#8741) :robot: I have created a release *beep* *boop* --- ## [5.1.0](https://togithub.com/googleapis/google-cloud-node/compare/projectify-v5.0.1...projectify-v5.1.0) (2026-06-24) ### Features * Update API sources and regenerate ([#8672](https://togithub.com/googleapis/google-cloud-node/issues/8672)) ([3391fd2](https://togithub.com/googleapis/google-cloud-node/commit/3391fd27d1c15e051293207a07c6db00e760d370)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore: standardize node engines semver range to >=18 across all package manifests (#8842) Standardize the Node.js engine requirement under "engines.node" to ">=18" across all 122 package manifests in the repository. Previously, package manifests across the monorepo used a mix of format variations (such as ">=18.0.0", ">=v18", or legacy ranges like ">=14"). While npm's semver parser silently strips leading "v" characters and trailing zeroes, official Semantic Versioning (SemVer 2.0.0) specifications and strict manifest validators require numeric version strings without letter prefixes. --------- Co-authored-by: feywind <57276408+feywind@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Adds the keepalive support.
Fixes #7818 🦕