A message may contain unstructured byte data, or a structured container.
Binary Data Message
By default, data is transported as unstructured bytes in the binary attachment message part.
Supported data types are:
ArrayBufferLike, e.g. ArrayBuffer, Uint8Array, Uint32Array, or similar
DataView
string (latin1-encoded; only supported for backwards compatibility; use new TextEncoder.encode(...) instead)
Structured Data Message
Alternatively, you can exchange data using the structured data API by passing it as Structured Data Type (SDT) in the form of a SDTField
of the type SDTFieldType#STRING, SDTFieldType#MAP or SDTFieldType#STREAM. Transporting data as structured message is useful
in a heterogeneous network that has clients that use different hardware architectures and programming languages, allowing exchanging binary data in
a structured, language- and architecture-independent way.
Represents the payload of a message.
A message may contain unstructured byte data, or a structured container.
Binary Data Message
By default, data is transported as unstructured bytes in the binary attachment message part.
Supported data types are:
ArrayBuffer
,Uint8Array
,Uint32Array
, or similarnew TextEncoder.encode(...)
instead)Structured Data Message
Alternatively, you can exchange data using the structured data API by passing it as Structured Data Type (SDT) in the form of a SDTField of the type SDTFieldType#STRING, SDTFieldType#MAP or SDTFieldType#STREAM. Transporting data as structured message is useful in a heterogeneous network that has clients that use different hardware architectures and programming languages, allowing exchanging binary data in a structured, language- and architecture-independent way.
Example:
SDTField.create(SDTFieldType.STRING, 'payload')
https://solace.com/blog/inside-solace-message-introduction/