Skip to main content

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:

FieldDescription
cmd

Type of message.

Always sow, as encoded by the protocol.

topicThe topic from which the records were produced.
sow_keyAn AMPS-created identifier for this message.
batch_sizeThe number of records returned in a single sow batch.
timestampThe 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_idThe QueryId of the query that produced this message.
msg_lenThe 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:

FieldDescription
sow_keyAn 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 CorrelationId.

The contents of this header must consist of characters that are legal in Base64 encoding.

msg_lenThe length of the next SOW message in the data portion of this message.