Skip to main content

read_group_order_response

Function read_group_order_response 

Source
fn read_group_order_response(
    buf: &mut impl Buf,
) -> Result<GroupOrder, CodecError>
Expand description

Read a Group Order from a message that must name a real order.

SUBSCRIBE_OK, PUBLISH, PUBLISH_OK and FETCH_OK each say “Values of 0x0 and those larger than 0x2 are a protocol error”: a responder reports the order it settled on, so deferring to the publisher is not an answer it can give. SUBSCRIBE and FETCH are the requests, and there 0x0 is exactly how a subscriber says it has no preference — “the original publisher’s Group Order SHOULD be used”. The two readers cannot be merged without either refusing traffic the requests permit or accepting a reply that tells the subscriber nothing.