sow_and_delta_subscribe
A sow_and_delta_subscribe
command is used to combine the functionality of commands sow
and a delta_subscribe
in a single command.
The sow_and_delta_subscribe
command is used: (a) to query the contents of a SOW topic (this is the sow
command); and (b) to place a subscription such that any messages matching the subscribed SOW topic and query filter will be published to the AMPS client (this is the delta_subscribe
command). As with the delta_subscribe
command, publish
messages representing updates to SOW records will contain only the information that has changed.
If a sow_and_delta_subscribe
is issued on a record that does not currently exist in the SOW topic, or if it is used on a topic that does not have a SOW-topic store defined, then a sow_and_delta_subscribe
will behave like a sow_and_subscribe
command.
Header Fields
The following table contains the header fields supported by a sow_and_delta_subscribe
command.
Options Field
The following table contains a list of the Options
available and their definitions when used in the AMPS sow_and_delta_subscribe
command.
Returns
A sow_and_delta_subscribe
command returns the following command types:
AMPS will send acknowledgment messages for the following AckType
fields: received
and processed
, along with a populated Status
header field describing the acknowledgment message.
If the sow_and_delta_subscribe
command is successful, AMPS will return a group_begin
message to notify the client that a group of messages is being returned as part of the sow
portion of the command. For more information about SOW topic query behavior, see the chapter on Querying the State of the World in the AMPS User Guide. The following table contains the AckType
messages which can be returned by a sow_and_delta_subscribe
.
The stats
acknowledgment message includes three values in the header, the Matches
, TopicMatches
and the RecordsReturned
. These are defined below:
TopicMatches
The total number of records compared across all matching SOW topics.
Matches
The number of records returned that match the topic regular expression and the content filter. This value can be greater than RecordsReturned
in the case where the number of returned records is limited by TopN
.
RecordsReturned
The total number of records returned to the client, which can be limited by the TopN
header value.
Errors
Errors for a sow_and_delta_subscribe
query are either returned in the Status
field if an AckType
has been defined, or the errors may be inserted into the AMPS log.
Last updated