delta_subscribe
The delta_subscribe
command is like the subscribe
command except that subscriptions placed through delta_subscribe
will receive only messages that have changed between the SOW record and the new update.
If delta_subscribe
is used on a topic which does not have a SOW store defined, then delta_subscribe
behaves like a subscribe
command.
Header Fields
The following table contains the header fields available to a delta_subscribe
command.
Field | Description |
| Command to be executed. Value: |
| Topic with which to place a subscription. |
| Acknowledgment type for the Value is a comma separated list of one or more of the following: |
| If specified with an AMPS command requesting an acknowledgment message, all requested acknowledgment messages will contain the |
| A Boolean ( A value of |
| String which is used as a content filter expression. When using XML, the filter must be wrapped in a |
| A comma separated list of flags available to the The Options Field table below describes the |
| Boolean ( Default: |
| Boolean ( |
| The subscription ID for this command. When provided with a new subscription, this is the identifier that AMPS will use for the subscription. When provided with the When provided with a For a new subscription, the AMPS clients will generate a subscription ID if one is not provided. |
| A bookmark specifying the point in the transaction log at which to start the subscription. If the topic provided is not recorded in a transaction log, AMPS enters the subscription without replaying messages. You can provide a single bookmark, or a comma-delimited list of bookmarks. When a list is provided, AMPS starts the subscription at the earliest bookmark in the list. |
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.
Option | Description |
| This is the default |
| Specifies that the subscription should return bookmarks, if available, on each publish message. Bookmarks are only available if the topic that is subscribed to is recorded in the transaction log. Notice that this option does not set the starting point for a bookmark subscription: use the This option is not required to receive bookmarks for a bookmark subscription. Those subscriptions always include bookmarks on each publish message. |
| Specifies whether to conflate this subscription. The value provided can be a time interval, When present and set to a value other than none, enables conflation for the subscription. Can also be set to Recognizes the same time specifiers used in the AMPS configuration file (for example, Default: |
| When conflation is enabled, specifies the fields to use to determine message uniqueness. The format of this option is a comma-delimited list of XPath identifiers within brackets. For example, to conflate based on the value of the
Defaults to the SOW key fields for SOW topics. No default for non-SOW topics. This option is required for non-SOW topics. This option is not valid with the |
| Tells AMPS to send messages to subscribing clients before they have been persisted to the transaction log. This option is only valid for bookmark subscriptions. |
| When subscribing to a queue, the number of unacknowledged messages the client is willing to accept at a time. AMPS will not exceed this number, but may choose a smaller number depending on the queue configuration. |
| Tells AMPS not to send empty publish messages to matching subscriptions. This can be useful for suppressing messages where no fields have changed. |
| Tells AMPS not to send the AMPS-generated SowKey for messages. |
| Specifies that the topic name should be a literal match, even if the topic name contains regular expression characters. |
| Send an OOF message for records which have fallen out of focus from the original subscription. When focus tracking is enabled, AMPS will also deliver the full message to a subscription when a previously out-of-focus message comes into focus. |
| Pause a bookmark subscription. This option is only valid for bookmark subscriptions that do not use the |
| Set the maximum message delivery rate for a bookmark subscription. This option is only valid for bookmark subscriptions that do not use the The rate can be specified as either the number of messages per second (for example, |
| Replace the subscription associated with |
| Resume a bookmark subscription. This option is only valid for bookmark subscriptions that do not use the When this option is present, AMPS resumes the subscription or subscriptions provided in the |
| AMPS will send the SOW keys fields back with messages from the SOW. Notice that without this option, messages will never contain these fields (since, by definition, they do not change from update to update). |
| AMPS will include a header with the time at which this instance of AMPS processed the incoming publish command for this message. |
Returns
A delta_subscribe
command returns the following command types:
Command | Description |
| A message published to AMPS. |
| Returned when the |
| Acknowledgments requested, as described in the following section. |
For a delta_subscribe
message, AMPS will send acknowledgment messages for the following AckType
fields: received
, processed
, persisted
and stats
along with a populated Status
header field describing the acknowledgment.
The following table contains the AckType
messages which can be returned by a delta_subscribe
.
Acknowledgment | Description |
| No This is the default behavior. |
| When a bookmark is present on the subscribe request and this acknowledgment is requested, AMPS sends a |
| When a bookmark is present and this acknowledgment is requested, AMPS periodically sends a |
| AMPS has compiled the filters for the |
| The |
| Returns an acknowledgment message with |
Errors
Any errors that occur during this command will be returned in the status of a processed
acknowledgment and logged to the log file. Regardless of success or failure, the processed
acknowledgment will be returned only if requested by including processed in the AckType
field of the delta_subscribe
message header.
Last updated