menuTicketing

Response Matching Rules (Client Implementation)

Since responses may arrive out of order relative to requests, demultiplex as follows.

RuleDetail
Matching keyThe echoed (op, key). A/T match against an A waiter; R/N match against an R waiter
Multiple requests with the same (op, key)Matched in the order sent (a FIFO queue per (op, key))
Registration timingThe waiter is registered before the request is sent (to prevent a race where the response arrives first)
Handling N/TReturned as non-error values ("didn't exist" / "timed out")
E / unknown responseLog and ignore (connection kept alive). not_active switches that connection to another node