Todos los productos
Search
Centro de documentos

:NotifyContentFormat

Última actualización: Sep 04, 2026

Cuando envía un mensaje desde Simple Message Queue (formerly MNS) a un endpoint, puede usar el parámetro NotifyContentFormat para especificar el formato del cuerpo del mensaje. Valores válidos: XML, JSON y SIMPLIFIED.

  • XML

      • Si establece el parámetro NotifyContentFormat en XML, el cuerpo del mensaje contiene el contenido del mensaje y los parámetros relacionados.

      • Este formato es compatible con endpoints HTTP y endpoints de cola.

      • Ejemplo:

        <?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

      • Si establece el parámetro NotifyContentFormat en JSON, el cuerpo del mensaje contiene el contenido del mensaje y los parámetros relacionados.

      • Este formato es compatible con endpoints HTTP y endpoints de cola.

      • Ejemplo:

        {
            "TopicOwner":"TopicOwner",
            "TopicName":"TopicName",
            "Subscriber":"Subscriber",
            "SubscriptionName":"SubscriptionName",
            "MessageId":"6CC4D900CA59A2CD-1-15180534A8F-20000****",
            "Message":"xxxxx",
            "MessageMD5":"F1E92841751D795AB325861034B5****",
            "MessageTag":"important",
            "PublishTime":"1449556920975"
        }
  • SIMPLIFIED

      • Si establece el parámetro NotifyContentFormat en SIMPLIFIED, el cuerpo del mensaje contiene únicamente el contenido del mensaje.

      • Este formato es compatible con endpoints HTTP, endpoints de cola y direcciones de correo electrónico.

      • Ejemplo:

        {1:"a", 2:"b"}