Structure of a message
Core identifiers
traceId
Trace identifier for one full distributed flow.
correlationId
Correlation identifier for one request/response or one stream session.
id
Unique message id.
instanceId
Unique event bridge instance id (sender side).
principalId and tenantId
Optional security/tenant metadata propagated through the flow.
Shared message fields
| field | required | meaning |
|---|---|---|
messageType | yes | command/response/custom/info/stream |
id | yes | message id |
timestamp | yes | unix time in ms |
traceId | yes | distributed trace id |
sender | yes | sender address (serviceName, serviceVersion, serviceTarget, instanceId) |
receiver | depends | target address for directed messages |
payload | depends | message body |
otp | no | OpenTelemetry propagation payload |
Stream message model
messageType: 'stream' uses frame-oriented payloads:
open: open request withpayload+parameterstart: producer accepted and stream startedchunk: one incremental result itemcomplete: terminal success (optional final payload)error: terminal failurecancel: terminal cancellationheartbeat: optional keepalive frame
A stream session is keyed by correlationId.
Practical debugging tips
- use
traceIdfor end-to-end flow views - use
correlationIdfor one command call or stream session - inspect sender/receiver address to verify routing correctness
- verify
eventNamefor subscription matching and event-driven fan-out
