Skip to content

Publisher ends the subscription on REQUEST_UPDATE with Forward=0 #6263

Closed

Description

@afrind

A moq-net publisher ends a subscription with PUBLISH_DONE (UPDATE_FAILED, "update failed") when the subscriber sends REQUEST_UPDATE with Forward=0. Pausing a subscription is a normal relay operation, so this breaks relays that pause an upstream subscription while they have no forwarding subscribers.

Update::decode_body marks any update carrying FORWARD=0 as unsupported:

let unsupported = forward == Some(false)

and apply_subscription_update then refuses it and ends the subscription:

// Either way the update failed, which ends the subscription.

Why Forward=0 should be accepted

Forward State is a core part of every established subscription (draft-18 §5.1, same text in draft-16):

All Established subscriptions have a Forward State which is either 0 or 1. The publisher does not send Objects if the Forward State is 0, and does send them if the Forward State is 1. [...] The subscriber can send PUBLISH_OK or REQUEST_UPDATE to update the Forward State.

The relay rules (draft-18 §9.4) assume that upstream subscriptions sit in Forward State 0 and get resumed:

If the SUBSCRIBE has Forward State=1 and the upstream subscriptions are in Forward State=0, the Relay MUST send REQUEST_UPDATE with Forward=1 to all publishers.

A relay that keeps an upstream subscription and pauses it with Forward=0 once its last forwarding subscriber goes away is doing what the draft describes. §9.2 does allow a publisher to "deprioritize, reject, or close" subscriptions that are not forwarded, to protect its resources. But refusing every Forward=0 update outright means a relay cannot pause a moq-net publisher at all. Its only option is to unsubscribe and resubscribe, and every resume then costs a round trip.

Expected

The publisher applies Forward=0, stops sending objects, answers REQUEST_OK, and keeps the subscription established until a later Forward=1 update.

Found while debugging

openmoq/moqx#852 hit the same refusal path from a different update. The relay sent Forward=1 together with a SUBSCRIPTION_FILTER that it should not have included, which moqx is fixing on its side. The rust publisher answered "REQUEST_UPDATE parameters not supported" and then PUBLISH_DONE status 0x8 "update failed", and the relay forwarded that downstream, ending the whole subscription. Reading that path showed that Forward=0 alone gets the same treatment, and that is the part this issue asks to change.

(Written by Claude Opus 5.5)

Activity

  1. added
    questBeing tracked/planned in a quest. See `quest/`
    on Oct 22, 2026
  2. kixelated commented on Oct 22, 2026

    @kixelated
    Collaborator

    Confirmed. The refusal is in apply_subscription_update (decode keeps the Forward value), and an initial SUBSCRIBE with Forward=0 is refused too.

    Decision: accept Forward=0 both on REQUEST_UPDATE and on the initial SUBSCRIBE, as one paused state. It reuses the pause/resume path PUBLISH already has: a paused subscription drops its upstream demand, answers REQUEST_OK, and resumes at the live edge on Forward=1.

    Planned as an m1 quest in #6272.

    (Written by Claude Opus 5.5)

  3. afrind commented on Oct 22, 2026

    @afrind
    Author

    Should I open a separate issue for location filter? Moqx did remove sending it but it is still legal to do so

  4. kixelated commented on Oct 22, 2026

    @kixelated
    Collaborator

    6. Should I open a separate issue for location filter? Moqx did remove sending it but it is still legal to do so

    If you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questBeing tracked/planned in a quest. See `quest/`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions