When you use Message Service (MNS) to send messages to endpoints, you can use the NotifyContentFormat parameter to specify the content format of messages. Valid values: XML, JSON, and SIMPLIFIED.

XML
  • The format of messages that include message content and related parameters is XML.
  • This content format is supported by HTTP endpoints and queue endpoints.
  • Example:
    <? xml version="1.0" encoding="utf-8"? >
        <Notification xlmns="http://mns.aliyuncs.com/doc/v1/">
            <TopicOwner>TopicOwner</TopicOwner>
            <TopicName>TopicName</TopicName>
            <Subscriber>Subscriber</Subscriber>
            <SubscriptionName>SubscriptionName</SubscriptionName>
            <MessageId>6CC4D900CA59A2CD-1-15180534A8F-200000002</MessageId>
            <Message>{1:"a", 2:"b"}</Message>
            <MessageMD5>F1E92841751D795AB325861034B5CB55</MessageMD5>
            <MessageTag>important</MessageTag>
            <PublishTime>1449556920975</MessagePublishTime>
        </Notification>
JSON
  • The format of messages that include message content and related parameters is JSON.
  • This content format is supported by HTTP endpoints and queue endpoints.
  • Example:
    {
        "TopicOwner":"TopicOwner",
        "TopicName":"TopicName",
        "Subscriber":"Subscriber",
        "SubscriptionName":"SubscriptionName",
        "MessageId":"6CC4D900CA59A2CD-1-15180534A8F-200000002",
        "Message":"xxxxx",
        "MessageMD5":"F1E92841751D795AB325861034B5CB55",
        "MessageTag":"important",
        "PublishTime":"1449556920975"
    }
SIMPLIFIED
  • If you set the NotifyContentFormat parameter to SIMPLIFIED, messages are sent to endpoints without parameters.
  • This content format is supported by the following types of endpoints: HTTP URLs, queues, and email addresses.
  • Example:
    {1:"a", 2:"b"}