This topic describes the URL and parameters of a Message Service (MNS) topic to which messages are published. You can call the PublishMessage operation to publish messages to topics.

TopicURL
  • The URL of an MNS topic. Syntax: http://$AccountId.mns. <Region>.aliyuncs.com/topics/$TopicName
  • mns. <Region>.aliyuncs.com: the endpoint that is used to access MNS. You must replace Region with the ID of the region in which MNS is deployed. If you want to view the endpoint of MNS in a region, go to the MNS console and click Get Endpoint in the upper-right corner of the console.
  • AccountId: the account ID of the topic owner. For more information, see Quick Start.
  • TopicName: the name of the topic. The name of each subscription that you create with an Alibaba Cloud account must be unique in a region.

Related parameters

MaximumMessageSize
  • The maximum size of a message, in bytes.
  • Valid values: 1024 to 65536 bytes (64 KB).
  • If the size of a message exceeds the limit, the message fails to be published to a topic.
LoggingEnabled
  • Specifies whether to enable the log management feature.
  • Valid values: True and False.
  • If you specify True for this parameter, MNS automatically pushes operations logs of the topic to a specified Object Storage Service (OSS) bucket.
CreateTime
The time when the topic was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
LastModifyTime
The time when the topic was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
MessageRetentionPeriod
  • The maximum retention time of a message in the topic, in seconds.
  • After the specified retention period, the message is deleted no matter whether the message has been pushed to subscribers.
MessageCount
  • The number of messages in the topic.
  • The messages that have been pushed to subscribers are included while the messages that have expired and been deleted are excluded.