sow: Content from Server
The sow
message returns a record from the SOW. For more information, see the State of the World (SOW) Topics and Querying the State of the World (SOW) chapters in the AMPS User Guide.
Header Fields
The following table contains the header fields returned in a sow
message. Notice that the wire format of the message may abbreviate these field names or encode them differently:
Field | Description |
---|---|
cmd | Type of message. Always |
topic | The topic from which the records were produced. |
sow_key | An AMPS-created identifier for this message. |
batch_size | The number of records returned in a single sow batch. |
timestamp | The time at which AMPS processed the message. This is returned in ISO-8601 format. This timestamp has microsecond precision. Fractions of a second are represented as a decimal value. |
query_id | The QueryId of the query that produced this message. |
msg_len | The length of the first SOW message in the data portion of this message. |
Data
The sow
message contains data. The data for the message consists of up to batch_size
messages, formatted as expected by the protocol. Each message contains its own header, with the following fields:
Field | Description |
---|---|
sow_key | An AMPS-created identifier for this message. |
correlation_id | A user-provided string that will be passed, verbatim, to subscribers. If this header is not present on the SOW record, subscribers receive no value for the The contents of this header must consist of characters that are legal in Base64 encoding. |
msg_len | The length of the next SOW message in the data portion of this message. |