Appearance
Actor Invocation
This section is the formal reference for how a caller invokes an op on an actor. Read these pages when you are writing a transport, a gateway, an SDK, or a contract spec; the Overview section (Request/reply) covers the same material conceptually.
| Page | What it covers |
|---|---|
| Request envelope | The MxEnvelope shape with every field, its purpose, and what is required vs optional. |
| Response envelope | Success replies — shape, op: '$reply', payload semantics. |
| Error envelope | Errors — shape, classification, the error field convention. |
| Correlation IDs | How CIDs are generated and scoped; relationship to NATS native _INBOX.*. |
| Timeouts | Default 5000 ms, per-call override, classification of timeout errors. |
| Streaming / sessions | Multi-message exchanges layered over request/reply + events. |
The two interaction shapes
Every actor invocation reduces to one of two shapes:
- Request/reply — one envelope in, one envelope out. Default timeout 5 s. The caller awaits a single response on a reply subject.
- Streaming session — one initiating envelope, then a stream of events (and optional follow-up requests) tagged by session ID. The actor decides when the session ends.
Pub/sub events without a request to anchor them are documented under Events, not here.
See also
- Subjects —
$inboxand$reply.{cid}wire format. - Subject grammar — exact transformation.
- Reserved subjects — the facet list.
- Envelope schemas — JSON-Schema-style reference for the envelope and its standard payloads.
- Error codes — the standardized error code reference.