全部產品
Search
文件中心

Simple Message Queue (formerly MNS):NotifyContentFormat

更新時間:Sep 03, 2024

NotifyContentFormat用於指定SMQ向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"}