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
Uint8Array
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:
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.
Example:
SDTField.create(SDTFieldType.STRING, 'payload')https://solace.com/blog/inside-solace-message-introduction/