This topic describes the URL and parameters of a Message Service (MNS) topic. You can call the PublishMessage operation to publish messages to a topic.
The URL of an MNS topic. Syntax:
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 ID of the Alibaba Cloud account to which the topic belongs.
Replace AccountId with the ID of the Alibaba Cloud account that is used to call MNS API operations. For more information, see Overview.
TopicName: the name of the topic.
Replace TopicName with the actual name of the MNS topic. In a region, each topic name within an Alibaba Cloud account must be unique.
- The maximum size of the message body. Unit: bytes.
- Valid values: 1024 B to 65536 B (64 KB).
- If the size of the message body exceeds the upper limit, the message fails to be published to the topic.
- Specifies whether to enable the log management feature.
- Valid values: True and False.
- If you set this parameter to True, MNS pushes operations logs of the topic to a specified Object Storage Service (OSS) bucket or a specified Logstore. For more information about log management, see Log management.
- The time when the topic was created. The value is a timestamp that follows the UNIX time format. It is the number of milliseconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
- The time when the topic was last modified. The value is a timestamp that follows the UNIX time format. It is the number of milliseconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
- The maximum period for which a message can be retained in the topic. Unit: seconds.
- A message that is published to the topic can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is pushed to the specified endpoints.
- The number of messages in the topic.
- These messages include messages that have been pushed to subscribers, but exclude messages that have expired and have been deleted.