Some messages include a Parameters field that encodes optional message elements.
Senders MUST NOT repeat the same parameter type in a message unless the
parameter definition explicitly allows multiple instances of that type to
be sent in a single message. Receivers SHOULD check that there are no
unauthorized duplicate parameters and close the session as a
PROTOCOL_VIOLATION if found. Receivers MUST allow duplicates of unknown
parameters.
Receivers ignore unrecognized parameters.
The number of parameters in a message is not specifically limited, but the total length of a control message is limited to 2^16-1 bytes.
Parameters are serialized as Key-Value-Pairs Figure 2.
Setup message parameters use a namespace that is constant across all MoQ Transport versions. All other messages use a version-specific namespace. For example, the integer '1' can refer to different parameters for Setup messages and for all other message types. SETUP message parameter types are defined in Section 9.3.2. Version-specific parameter types are defined in Section 9.2.1.
9.2.1. Version Specific Parameters
Each version-specific parameter definition indicates the message types in which it can appear. If it appears in some other type of message, it MUST be ignored. Note that since Setup parameters use a separate namespace, it is impossible for these parameters to appear in Setup messages.
9.2.1.2. DELIVERY TIMEOUT Parameter
The DELIVERY TIMEOUT parameter (Parameter Type 0x02) MAY appear in a TRACK_STATUS, TRACK_STATUS_OK, PUBLISH, PUBLISH_OK, SUBSCRIBE, SUBSCRIBE_OK, or SUBSCRIBE_UDPATE message. It is the duration in milliseconds the relay SHOULD continue to attempt forwarding Objects after they have been received. The start time for the timeout is based on when the Object Headers are received, and does not depend upon the forwarding preference. There is no explicit signal that an Object was not sent because the delivery timeout was exceeded.
If both the subscriber and publisher specify the parameter, they use the min of the two values for the subscription. The publisher SHOULD always specify the value received from an upstream subscription when there is one, and nothing otherwise.
Publishers can, at their discretion, discontinue forwarding Objects earlier than
the negotiated DELIVERY TIMEOUT, subject to stream closure and ordering
constraints described in Section 10.4.3. However, if neither the
subscriber nor publisher specifies DELIVERY TIMEOUT, all Objects in the track
matching the subscription filter are delivered as indicated by their Group Order
and Priority. If a subscriber fails to consume Objects at a sufficient rate,
causing the publisher to exceed its resource limits, the publisher MAY terminate
the subscription with error TOO_FAR_BEHIND.
If an object in a subgroup exceeds the delivery timeout, the publisher MUST reset the underlying transport stream (see Section 10.4.3).
When sent by a subscriber, this parameter is intended to be specific to a subscription, so it SHOULD NOT be forwarded upstream by a relay that intends to serve multiple subscriptions for the same track.
Publishers SHOULD consider whether the entire Object can likely be successfully delivered within the timeout period before sending any data for that Object, taking into account priorities, congestion control, and any other relevant information.
9.2.1.3. MAX CACHE DURATION Parameter
The MAX_CACHE_DURATION parameter (Parameter Type 0x04) MAY appear in a PUBLISH, SUBSCRIBE_OK, FETCH_OK or TRACK_STATUS_OK message. It is an integer expressing the number of milliseconds an object can be served from a cache. If present, the relay MUST NOT start forwarding any individual Object received through this subscription or fetch after the specified number of milliseconds has elapsed since the beginning of the Object was received. This means Objects earlier in a multi-object stream will expire earlier than Objects later in the stream. Once Objects have expired from cache, their state becomes unknown, and a relay that handles a downstream request that includes those Objects re-requests them.