A publisher sends a FETCH_OK as the first message on the bidi stream in response to a successful fetch. A publisher MAY send Objects in response to a FETCH before the FETCH_OK message is sent, but the FETCH_OK MUST NOT be sent until the End Location is known.
FETCH_OK Message {
Type (vi64) = 0x18,
Length (16),
End Of Track (8),
End Location (Location),
Number of Parameters (vi64),
Parameters (..) ...
Track Properties (..),
}
-
End Of Track: 1 if all Objects have been published on this Track, and the End Location is the final Object in the Track, 0 if not.
-
End Location: The largest object covered by the FETCH response. The End Location is determined as follows:
-
If the requested FETCH End Location was beyond the Largest known (possibly final) Object, End Location is {Largest.Group, Largest.Object + 1}
-
If End Location.Object in the FETCH request was 0 and the response covers the last Object in the Group, End Location is {Fetch.End Location.Group, 0}
-
Otherwise, End Location is Fetch.End Location Where Fetch.End Location is either Fetch.Standalone.End Location or the computed End Location described in Section 9.14.2.1.
If the relay is subscribed to the track, it uses its knowledge of the largest {Group, Object} to set End Location. If it is not subscribed and the requested End Location exceeds its cached data, the relay makes an upstream request to complete the FETCH, and uses the upstream response to set End Location.
If End Location is smaller than the Start Location in the corresponding FETCH the receiver MUST close the session with a
PROTOCOL_VIOLATION. -
-
Parameters: The parameters are defined in Section 9.3.
-
Track Properties : A sequence of Properties. See Section 2.5.