moq-net: expose a per-registration token matching a resolved broadcast to its route event

Open
#10,390 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
api, backend

Research direction

Start by reading the definitions of RouteEvent, Announce, RouteInfo::epoch, and broadcast::Info, then trace how route registrations and resolved consumers are created. Work out where one local token can be assigned per registration and carried through both public APIs, including same-identity reconnects. Done means consumers and route events expose matching opaque tokens that distinguish registrations without implying ordering across identities.

Written by the indexing model from the issue text.

Description

quest

Problem

An application that follows an origin's routes (RouteEvent) and separately resolves the broadcasts at those paths cannot tell which route registration a resolved broadcast::Consumer belongs to. Each re-registration of a path, including a publisher reconnecting under the same identity, gets a new incarnation (RouteInfo::epoch), but that field is pub(crate) and nothing public carries an equivalent: RouteEvent has kind and announce, and broadcast::Info has no per-registration id.

So an application that keeps per-registration state (for example, an id it mints on each route start and attaches to work it does on that broadcast) has to pair the two by event order across cursors. That is exact in the common case but not by construction: if two registrations of one path come and go between two turns of the application's loop, a broadcast from the earlier registration can be paired with the later one's state.

Ask

Expose an opaque, local (never on the wire) per-registration token that:

  • is distinct for every registration of a path, including same-identity reconnects that today arrive as an in-place change;
  • is available both on the route event (or its Announce) and on the resolved broadcast (broadcast::Info or the consumer), so the two match exactly;
  • carries no ordering or meaning across identities, matching how epoch is used today.

Exposing epoch as-is would not be enough on its own, since it orders incarnations of one identity only and a token needs to tell registrations of different identities apart too.

(Written by Claude Opus 5.5 with high)

Dominant language
Rust
Stars
1.6k
Forks
251
Avg merge
10h 10m
Merged PRs (30d)
822

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moq-dev/moq

All issues in moq-dev/moq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.