§3.6.

Subscribing to Tracks by Prefix

draft-22 · View on IETF ↗

SUBSCRIBE_TRACKS requests subscriptions: the publisher sends PUBLISH messages for tracks within matching namespaces, excluding tracks published by the subscriber.

A SUBSCRIBE_TRACKS with zero Track Namespace fields indicates the subscriber is requesting a Subscription for all Tracks from the publisher.

SUBSCRIBE_TRACKS is not required for a publisher to send PUBLISH messages to a subscriber. It is useful, for example, when the subscriber does not know the exact names of the tracks it wants, or when those tracks will be published.

The publisher will respond with SUBSCRIBE_TRACKS_OK or SUBSCRIBE_TRACKS_ERROR on the response half of the stream. If the subscriber receives any message other than a SUBSCRIBE_TRACKS_OK or a SUBSCRIBE_TRACKS_ERROR as the first message on the response half of the stream, then it MUST close the session with a PROTOCOL_VIOLATION. If the SUBSCRIBE_TRACKS is successful, the publisher will send PUBLISH messages on new bidirectional streams for tracks matching the Namespace Prefix. If it is an error, the stream will be closed via FIN after SUBSCRIBE_TRACKS_ERROR is sent.

Within a session, if a publisher receives a SUBSCRIBE_TRACKS with a Track Namespace Prefix that shares a common prefix with an established SUBSCRIBE_TRACKS, it MUST respond with SUBSCRIBE_TRACKS_ERROR with error code PREFIX_OVERLAP.

The publisher MUST ensure the subscriber is authorized to perform this namespace subscription.

A SUBSCRIBE_TRACKS is cancelled as described in Section 6.4.2.3. Cancelling SUBSCRIBE_TRACKS does not prohibit original publishers from sending further PUBLISH messages, but relays MUST NOT send any further PUBLISH messages to a client without knowing the client is interested in and authorized to receive the content.

3.6.1. Filtering SUBSCRIBE_TRACKS

Range Filters Section 3.3.2 can be used in SUBSCRIBE_TRACKS to filter Tracks in a namespace using the Track Property Filter. Objects published in the resulting Subscriptions can be filtered by any Range Filter.

3.6.2. Parameters on SUBSCRIBE_TRACKS

Any Parameter that can be specified on a Subscription (ie: in SUBSCRIBE) is valid in SUBSCRIBE_TRACKS, unless otherwise specified. These parameters are used by the publisher as the initial Subscription parameters when a PUBLISH is sent as a result of SUBSCRIBE_TRACKS, and explicitly communicated in the PUBLISH. When a Parameter is omitted from the SUBSCRIBE_TRACKS and resulting PUBLISH, the Subscription uses the default value.

To join Tracks initiated via the resulting PUBLISHes, the subscriber can specify a Location Filter and optionally include FILL_PARAMETERS in the SUBSCRIBE_TRACKS, or in a REQUEST_UPDATE following PUBLISH_OK, as described in Section 3.5.

3.6.3. Skipped Tracks

If a Subscription cannot be created because there are no available bidirectional streams or any other reason, the Publisher sends a PUBLISH_SKIPPED message on the SUBSCRIBE_TRACKS response stream to indicate the Full Track Name of the Subscription that was not created. The Publisher MUST NOT send a PUBLISH for a Track for a given SUBSCRIBE_TRACKS after PUBLISH_SKIPPED has been sent, scoped to a single PUBLISH. If, for example, the publisher disconnects from a relay and later reconnects and sends a new PUBLISH, the relay MAY send the new PUBLISH downstream. If desired, the subscriber can issue a SUBSCRIBE to establish a subscription to that track.

This is one section of the MoQT specification, rendered per-section for quick reference and citation. The authoritative text is draft-ietf-moq-transport-22 at the IETF.