Wire contract¶
contract/asyncapi.yaml is the normative source for messages, required fields, connection rules, and the command registry. The generated page is a projection for reading; edit the YAML, not the projection.
Connection sequence¶
Text equivalent: the guest dials, identifies itself and its contract revision, and waits for acceptance. Only then may either side exchange application messages. Heartbeats keep the session observable. A graceful side sends bye; incompatible revisions are refused before normal traffic.
Frame and lane rules¶
An eight-byte header identifies channel, flags, transfer, and payload length. JSON control frames and raw bulk frames are multiplexed. Control words queue and retry; bulk data is recoverable and may be abandoned only at a frame boundary. One transfer owns the bulk lane at a time.
File transfer¶
Text equivalent: the initiator proposes one transfer, the receiver accepts or refuses, bulk frames follow, and only receiver-originated progress proves bytes arrived. Completion is receiver-owned; a sender's socket acceptance is not delivery evidence.
Compatibility rule¶
Fields are additive unless a revision explicitly changes meaning. Unknown enum values are not consent. Every local $ref must resolve, every behavior change begins in the contract, and both receiving directions must retain the same meaning.
Mirror invalidation¶
mirror.invalidate is an optional symmetric notification, not a command and
not authoritative state. It identifies one session and the newest known
overall and per-domain generations, with quality and loss information. The
receiver coalesces refresh work, repairs gap or unknown quality, and keeps
cadence polling as the fallback. A hint can make a read happen sooner; only a
coherent reread can publish the new state.
Text equivalent: the guest hints that one or more generations changed; the host coalesces and schedules bounded reads, receives authoritative tagged state, and publishes only when the generation set is coherent and current.