Skip to main content

DEFAULT_PUBLISHER_PRIORITY

Constant DEFAULT_PUBLISHER_PRIORITY 

Source
const DEFAULT_PUBLISHER_PRIORITY: u8 = 128;
Expand description

The Publisher Priority a fetch frame that states none is read under.

Drafts 16-20 let an object leave the field off the wire and take the previous object’s, and an End of Range indicator carries none at all, so a stream can reach a frame with no priority ever having been stated. Every one of those drafts fixes the same fallback for a subscription that never stated one — draft-19 Section 12.4: “If omitted, the Default Publisher Priority is 128” — and that is what is reported here.

Draft-15 needs no such fallback: its own reader refuses an object that inherits a priority with nothing to inherit from, and it has no End of Range frame, so every draft-15 fetch object has a priority the stream stated.

An End of Range indicator reports the Priority still in force from the last Object before it, and this constant only when no Object has preceded it. None of the four drafts decides that. Drafts 17, 18 and 19 say what the next Object inherits — draft-19 Section 11.4.4.2: “Prior Priority: The Priority from the last actual Object before the End of Range indicator” — draft-16 does not say even that, and all four agree only that a marker carries no Priority field. So the answer is chosen here, once, for the four of them: AnyFetchObject::publisher_priority is a u8 with no way to report “none”, and the value in force is one the stream did state, where this constant would be one it never did.