Skip to main content

Message Structure

All messages have a consistent structure.

Message
Header
sequencing / metadata / routing
Payload
user-defined data

The header is comprised of the following fields:

FieldResponsibilityDescription
sequenceNumberPlatformThe unique sequence number assigned by the Sequencer. This provides the platform ordering for the message.
sequencerNanoTimePlatformThe timestamp that the message was received by the Sequencer.
relayNanoTimePlatformThe timestamp that the message was received by the Relay supplying the message to an application.
messageTypePlatformIndicates how the message was delivered to the application:
  • LIVE - the message was received from live platform data.
  • CACHED - the message was supplied from the platform cache.
applicationIdAPIThe unique identifier of the application that published the message.
applicationSequenceNumberAPIAn application-provided sequence number for the publication, useful for publisher-side ordering, diagnostics and reconciliation.
publicationNanoTimeAPIAn application-provided timestamp associated with publishing the data.
voidedApplicationIndicates whether the message should be treated as no longer valid. Voided messages are routed separately and evicted from the cache.
editableApplicationIndicates whether edit requests can be made for this data. Messages are not editable by default.
cacheModeApplicationControls how the message participates in platform caching. Values are CACHE, CACHE_FOREVER and DO_NOT_CACHE, see Message Caching for details.
payloadSchemaIdApplicationIdentifies the schema or model namespace of the payload. It tells subscribers which schema family the payload belongs to, but not the specific message type inside that schema. This field is automatically set by the API when using SBE, DTO, Flexible and Custom serialization.
payloadTemplateIdApplicationIdentifies the concrete type within a schema. This field is automatically set by the API when using SBE, DTO, Flexible and Custom serialization. Subscribers use the (payloadSchemaId, payloadTemplateId) tuple to select the correct decoder.
topicSourceApplicationThe Topic Source. See Topic Structure.
topicGroupApplicationThe Topic Group. See Topic Structure.
topicIdApplicationThe Topic Id. See Topic Structure.
causeSequenceNumberApplicationOptional sequence number of the incoming message that caused this message to be published. This is useful for cause-and-effect tracking.

payloadSchemaId and payloadTemplateId are used together to identify the payload type. This is the Type component described in Topic Structure and allows subscribers and tooling to select the correct schema, decoder or payload handler.