A subscription includes a Message Service (MNS) topic that is subscribed and an endpoint that is used to receive messages. You can call the Subscribe operation to create a subscription. After the subscription is created, you can publish messages to the topic and MNS pushes the messages to a specified endpoint. If the endpoint is invalid, the messages fail to be pushed. In this case, MNS retries to push messages based on a specified retry policy. If the retries fail, the messages are discarded.

SubscriptionURL

The syntax of the subscription URL is http://$AccountId.mns.<Region>.aliyuncs.com/topic/$TopicName/subscriptions/$SubscriptionNamecodeph.

  • mns.<Region>.aliyuncs.com: the endpoint that is used to access MNS.

    Replace Region with the ID of the region where the topic resides. To view the endpoint of MNS, go to the MNS console and click Get Endpoint in the upper-right corner.

  • AccountId: the account ID of the topic owner.

    When you call MNS API operations, replace the value with the ID of your Alibaba Cloud account.

  • TopicName: the name of the topic.

    When you call MNS API operations, replace the value with the actual topic name.

  • SubscriptionName: the name of the subscription.

    When you call MNS API operations, replace the value with the actual subscription name. The subscription name must be unique in the topic.

Parameters

Endpoint
  • The endpoint that is used to receive messages from the topic.
  • Valid values: HttpEndpoint and QueueEndpoint.
FilterTag
  • The tag that is used to filter messages.
  • Data type: string.
  • If you specify this parameter, MNS pushes only the messages that are attached with the specified tags.
NotifyStrategy
  • The retry policy that is applied if a message fails to be pushed.
  • Valid values: BACKOFF_RETRY and EXPONENTIAL_DECAY_RETRY.
  • If a message fails to be pushed, MNS retries to push the message based on the specified retry policy. If the retries fail, MNS discards the message and continues to push the next message.

    For more information about retry policies, see NotifyStrategy.

NotifyContentFormat
  • The format of the message that is pushed to the endpoint.
  • Valid values: XML and SIMPLIFIED.

    For more information about the message format, see NotifyContentFormat.

CreateTime
The time when the subscription was created. The value is a UNIX timestamp. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
LastModifyTime
The time when the subscription was last modified. The value is a UNIX timestamp. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.