feat: add WatchReaders reader-join stream to v3 RelayService - #6
Merged
Conversation
alvgaona
force-pushed
the
feature/rew-218
branch
from
July 30, 2026 12:03
a85763f to
8f76901
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.
Summary
The bridge needs to know when a reader joins the relay's message stream so it can replay latched topics that the relay's bounded history evicted. The relay observes joins but had no way to announce them. This adds the announcement channel to the v3 relay service as a server-streaming rpc, named for the observed fact rather than today's most common client, since a viewer is the typical reader and a data-platform uploader is another.
Changes
WatchReaders(WatchReadersRequest) returns (stream ReaderEvent)onrewire.v3.RelayServiceReaderEventcarries a monotonic join count and nothing else, no reader identity. The stream opens with one event carrying the current count so a freshly connected watcher learns the baseline, and a count lower than previously seen tells a watcher the relay restartedpixi run generate-prototask. Unrelated codegen churn in v1 and v2 is excludedRelated
Checklist
pixi run sanitypasses locally (check + fmt + lint + test)cargo clippy --all-features --all-targets -- -D warningsis cleancargo doc --no-deps --all-featuresbuilds without warningsBreaking changes
None. The rpc is additive and existing clients are unaffected. Servers that predate it answer unimplemented, which the bridge treats as feature absence.