§10.18.

SUBSCRIBE_NAMESPACE

The subscriber sends a SUBSCRIBE_NAMESPACE control message on a new bidirectional stream to a publisher to request the current set of matching published namespaces, as well as future updates to the set.

SUBSCRIBE_NAMESPACE Message {
  Type (vi64) = 0x50,
  Length (16),
  Request ID (vi64),
  Track Namespace Prefix (..),
  Number of Parameters (vi64),
  Parameters (..) ...
}
Figure 20: MOQT SUBSCRIBE_NAMESPACE Message
  • Request ID: See Section 10.1.

  • Track Namespace Prefix: A Track Namespace structure as described in Section 2.4.1 with between 0 and 32 Track Namespace Fields. This prefix is matched against track namespaces known to the publisher. For example, if the publisher is a relay that has received PUBLISH_NAMESPACE messages for namespaces ("example.com", "meeting=123", "participant=100") and ("example.com", "meeting=123", "participant=200"), a SUBSCRIBE_NAMESPACE for ("example.com", "meeting=123") would match both. If an endpoint receives a Track Namespace Prefix consisting of greater than 32 Track Namespace Fields, it MUST close the session with a PROTOCOL_VIOLATION.

  • Parameters: The parameters are defined in Section 10.2.

The publisher will respond with REQUEST_OK or REQUEST_ERROR on the response half of the stream. If the subscriber receives any message other than a REQUEST_OK or a REQUEST_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_NAMESPACE is successful, the publisher will send matching NAMESPACE messages on the response stream. If it is an error, the stream will be immediately closed via FIN. When there are changes to the namespaces being published and the subscriber is subscribed to them, the publisher sends the corresponding NAMESPACE or NAMESPACE_DONE messages.

Within a session, if a publisher receives a SUBSCRIBE_NAMESPACE with a Track Namespace Prefix that shares a common prefix with an established SUBSCRIBE_NAMESPACE, it MUST respond with REQUEST_ERROR with error code PREFIX_OVERLAP. SUBSCRIBE_NAMESPACE and SUBSCRIBE_TRACKS have independent overlap spaces (see Section 10.19).

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

The publisher MUST NOT send NAMESPACE_DONE for a namespace suffix before the corresponding NAMESPACE. If a subscriber receives a NAMESPACE_DONE before the corresponding NAMESPACE, it MUST close the session with a 'PROTOCOL_VIOLATION'.

If the publisher is unable to send NAMESPACE or NAMESPACE_DONE messages in a timely manner because the SUBSCRIBE_NAMESPACE response stream is blocked by flow control, the publisher MAY reset the SUBSCRIBE_NAMESPACE response stream. When a subscriber receives a stream reset or FIN on a SUBSCRIBE_NAMESPACE response stream, it SHOULD treat this as though each active namespace received a NAMESPACE_DONE. Subscriptions established via PUBLISH on separate bidi streams are not affected by closure of the SUBSCRIBE_NAMESPACE stream.

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