§3.4.

Fill Semantics

draft-21 · View on IETF ↗

A subscription that carries a FILL_PARAMETERS parameter (see Section 9.20.16) causes the publisher to open a unidirectional stream beginning with a FETCH_HEADER (see Section 11.4.1) and delivered as a FETCH response (see Section 9.11). This is called a fill fetch stream.

The fill range is the range of Locations selected by the Location filter inside FILL_PARAMETERS, or the subscription's Location filter if it is omitted. The filter is evaluated using the rules for a Fetch in Section 3.3.1, so the fill range never extends beyond Largest Object. When the subscription has no Location filter, or the LOCATION_FILTER inside FILL_PARAMETERS is zero-length, the fill range is the entire track up to Largest Object. The subscriber learns the Largest Object from the LARGEST_OBJECT parameter in SUBSCRIBE_OK or REQUEST_UPDATE_OK.

Because the fill range is specified independently of the subscription's Location filter, a subscriber can retrieve a range of Groups prior to the live edge while the subscription itself starts at the Next Group. If the fill range is empty, or starts after Largest Object, the publisher does not open a fill fetch stream.

The fill fetch stream inherits the subscription's parameters, including subscriber priority, range filters and authorization; parameters carried inside FILL_PARAMETERS override them for the fill fetch stream. FILL_TIMEOUT (see Section 9.20.6) applies to fill fetch streams in the same way it applies to a FETCH.

The FETCH_HEADER on the fill fetch stream carries the Request ID of the message that initiated it: the SUBSCRIBE Request ID for the initial fill, or the REQUEST_UPDATE Request ID for a subsequent fill. As a result of REQUEST_UPDATE, a subscription can have multiple fill fetch streams open at once, each identified by its Request ID; opening a new fill fetch stream does not implicitly cancel any previously opened fill fetch streams.

An object delivered on the fill fetch stream is fill-delivered. When the fill range overlaps the subscription's Location filter, an object can be both fill-delivered and subscription-delivered. A subscriber that wants each Object delivered exactly once uses the Next Object Subscription Location Filter coupled with an open-ended fill range, which the publisher will end at Largest Object.

3.4.1. Opening and Closing Fill Fetch Streams

A publisher opens a fill fetch stream when it processes a SUBSCRIBE or REQUEST_UPDATE that carries FILL_PARAMETERS while Forward State is 1.

  • FILL_PARAMETERS carried while Forward State is 0 opens no fill fetch stream. Transitioning to Forward State 1 without re-sending FILL_PARAMETERS does not open one either.

  • A REQUEST_UPDATE that does not carry FILL_PARAMETERS does not open a new fill fetch stream.

  • When the subscription is cancelled, the publisher MUST reset any open fill fetch streams.

The publisher signals that the fill is complete by closing the stream with a FIN once all objects in the fill range have been delivered. Because there is no REQUEST_ERROR associated with a fill fetch stream, the publisher signals a fill failure by resetting the stream; it MUST open a fill fetch stream and reset it immediately after the FETCH_HEADER if necessary. A subscriber can cancel a fill fetch stream independently using STOP_SENDING. Resetting or cancelling a fill fetch stream, by either endpoint, does not affect the subscription, which continues to deliver objects using subscribe subgroups and datagrams.

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