Expand description
RedWire live queue-wait dispatch (issue #917, PRD #915).
Carries the wire-side envelopes for the live queue-wait happy path:
QueueWaitOpen(client→server) — open a wait on a queue. The awaiting session parks on the queue-wait registry’s async wake head (no blocking OS thread) and re-probes the normal delivery path on each wake.QueueEventPush(server→client) — the delivered message, pushed the instant one becomes deliverable on that queue.
Distinct from the OpenStream/StreamChunk output-stream family in
super::output_stream, which stays query-result pull. These
envelopes carry queue delivery and reuse the frame’s stream_id for
multiplexing so a wait can coexist with other streams on the same
connection.
Structs§
- Queue
Wait Open Request - Parsed
QueueWaitOpenpayload. Shape:
Enums§
Constants§
- WAIT_
CANCELLED_ CODE StreamErrorcode for a live queue-wait terminated by server-side cancellation (registrycancel_all, e.g. shutdown). Distinct fromWAIT_FAILED_CODE(a genuine runtime error) and from the timeout frame, so the three non-delivery outcomes never alias on the wire.- WAIT_
EXCEEDS_ CAP_ CODE StreamErrorcode for a wait open whose requested budget exceeds the server’s maximum wait cap (issue #919). The accompanying message names thered.configkey so an operator can act on it.- WAIT_
FAILED_ CODE StreamErrorcode for a runtime failure while servicing a wait (e.g. the queue read errored). Non-fatal at the connection level.
Functions§
- build_
event_ push_ frame - Build a
QueueEventPushframe echoing the open request’scorrelation_idandstream_idso the client pairs the push with the wait it opened. - build_
event_ push_ payload - Build the
QueueEventPushpayload for one delivered message. Themessagevalue is the JSON object rendered by the runtime (message_id/payload/consumer/delivery_count). - build_
queue_ wait_ error_ frame - Build a
StreamErrorframe carrying a queue-wait parse/validation failure for a specificstream_id. Non-fatal at the connection level — the session keeps reading other frames. - build_
queue_ wait_ timeout_ frame - Build a
QueueWaitTimeoutframe for an elapsed wait (issue #919). - parse_
queue_ wait_ open