NotifyContentFormat用于指定MNS向Endpoint推送消息时,消息内容的格式。

XML
  • 消息体为XML格式,包含消息正文和消息属性。
  • HttpEndpoint和QueueEndpoint支持该格式。
  • 消息示例:
    <?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-20000****</MessageId>
            <Message>{1:"a", 2:"b"}</Message>
            <MessageMD5>F1E92841751D795AB325861034B5****</MessageMD5>
            <MessageTag>important</MessageTag>
            <PublishTime>1449556920975</MessagePublishTime>
        </Notification>
JSON
  • 消息体为JSON格式,包含消息正文和消息属性。
  • HttpEndpoint和QueueEndpoint支持该格式。
  • 消息示例:
    {
        "TopicOwner":"TopicOwner",
        "TopicName":"TopicName",
        "Subscriber":"Subscriber",
        "SubscriptionName":"SubscriptionName",
        "MessageId":"6CC4D900CA59A2CD-1-15180534A8F-20000****",
        "Message":"xxxxx",
        "MessageMD5":"F1E92841751D795AB325861034B5****",
        "MessageTag":"important",
        "PublishTime":"1449556920975"
    }
SIMPLIFIED
  • 消息体即用户发布的消息,不包含任何属性信息。
  • HttpEndpoint、QueueEndpoint和MailEndpoint均支持该格式。
  • 消息体示例:
    {1:"a", 2:"b"}