Publishing a Text Message
Scenarios
After you publish a text message to a topic, SMN will deliver the message to all confirmed subscription endpoints in the topic.
Prerequisites
Subscribers in the topic must have confirmed the subscription, or they will not be able to receive any messages.
Procedure
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Click . Select Simple Message Notification under Management & Governance.
The SMN console is displayed.
- In the navigation pane on the left, choose Topic Management > Topics.
The Topics page is displayed.
- In the topic list, locate the topic that you need to publish a message to and click Publish Message in the Operation column.
Alternatively, locate the topic and click its name. In the upper right corner of the displayed topic details page, click Publish Message.
- Configure the required parameters based on Table 1.
- Configure basic information about message publishing.
Table 1 Parameter descriptions Parameter
Description
Subject
(Optional) The message subject must be fewer than 512 bytes.
Message Format
The message format can be Text, JSON, or Template. In this context, select Text.
- Text: common text message
- JSON: JSON message
- Template: template message. For details, see Message Template Management.
Message
The message content, which cannot be left blank nor exceed 256 KB.
- (Optional) Configure message attribute parameters. Message attributes specify the scope of message publishing.
Table 2 Message attribute parameters Parameter
Description
Type
Select the type of the message to be published.
- Protocol
- String Array
- String
Name
Enter up to 32 characters, including only digits, lowercase letters, and underscores (_). Start with a number or lowercase letter. Do not end with an underscore (_) or enter consecutive underscores (_).
- When you set Type to Protocol, Name is smn_protocol by default.
- If you set Type to String array, enter the name of the array that restricts the message to be published.
- When you set Type to String, enter the name of the character string that restricts the message to be published.
Value
- When you set Type to Protocol, select a protocol from the drop-down list. The available options are SMS, Email, HTTP, HTTPS, FunctionGraph (function), and functionGraph (workflow).
- When you set Type to String array, enter a string array. Length: 1 to 10
- When you set Type to String, you cannot leave Value blank. Enter up to 32 characters, including only digits, letters, and underscores (_).
Figure 1 shows an example text message. - Configure basic information about message publishing.
- Click OK.
SMN delivers your message to all subscription endpoints. For details about the messages received by each endpoint, see Messages Using Different Protocols.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot