Cookbook: Delta Subscribe
This section presents common recipes for subscribing to a topic in AMPS using the Command
or Message
interfaces. This section provides information on how to configure the request to AMPS. You can adapt this information to your application and the specific interface you are using.
Command: delta_subscribe
Basic Delta Subscription
In its simplest form, a delta subscription needs only the topic to subscribe to.
Header | Comment |
---|---|
| Sets the topic to subscribe to. All messages from the topic will be delivered on this subscription. The topic specified can be the literal topic name, or a regular expression that matches multiple topics. |
Delta Subscription with Options
In its simplest form, a delta subscription needs only the topic to subscribe to. To add options to the subscription, set the Options
header on the Command
.
Header | Comment |
---|---|
| Sets the topic to subscribe to. All messages from the topic will be delivered on this subscription. The topic specified can be the literal topic name, or a regular expression that matches multiple topics. |
| A comma-delimited set of options for this command. See the |
Delta Subscription with Content Filter
To provide a content filter on a delta subscription, set the Filter
property on the command. The AMPS User Guide provides details on the filter syntax.
Header | Comment |
---|---|
| Sets the topic to subscribe to. The topic specified can be the literal topic name, or a regular expression that matches multiple topics. |
| Sets the content filter to be applied to the subscription. Only messages that match the content filter will be provided to the subscription. |
Last updated