This topic describes the operations that you can perform to manage queues in the Simple Message Queue (SMQ, formerly MNS) console.
Prerequisites
SMQ is activated, and a Resource Access Management (RAM) user is authorized to access SMQ. For more information, see Activate SMQ and authorize RAM users to access SMQ.
Create a queue
Log on to the SMQ console.
In the left-side navigation pane, choose Queue Model > Queues.
In the top navigation bar, select a region.
On the Queues page, click Create Queue.
In the Create Queue panel, set the following parameters and click OK.
Name: the name of the queue.
Maximum Message Length: the maximum length of the message that is sent to the queue.
Long Polling Period: the maximum duration for which long polling requests are held after the ReceiveMessage operation is called. If you set this parameter to 0, the long polling mode is disabled.
Visibility Timeout Period: the duration for which a message stays in the Inactive state after the message is received from the queue. For more information, see Message visibility.
Message Retention Period: the maximum duration for which a message is retained in the queue. After the specified retention period ends, the message is deleted regardless of whether the message is received.
Scheduled Period: the period after which all messages sent to the queue are consumed.
Enable Logging Feature: specifies whether to enable the logging feature. After you enable the logging feature, the operation logs in the queue are automatically pushed to the specified Logstore. You can view message traces, delay, and other information in the logs. For more information, see Log management.
After the queue is created, it is displayed on the Queues page.
Edit a queue
On the Queues page, find the queue that you want to modify, click in the Actions column, and then select Edit.
In the panel that appears, modify the parameters and click OK.
In the Basic Information section of the Basic Information page, you can view the modified queue settings.
Search for queues
In the search box of the Queues page, enter the prefix of a queue name, such as test, and click the search icon.
All the queues whose names are prefixed by test appear on the page.
View the details of a queue
On the Queues page, find the queue that you want to view and click Details in the Actions column.
On the Queue Details page, you can view the details of the queue.
View the endpoints of a queue
On the Queues page, find the queue that you want to view and click Details in the Actions column.
In the Endpoint section of the Queue Details page, view the endpoints that are used to access the queue over the Internet Access and an Internal Access.
NoteYou can send HTTP or HTTPS requests to access the endpoints.
View the monitoring metrics of a queue
On the Queues page, find the queue that you want to view, click in the Actions column, and then select Cloud Monitor.
In the Cloud Monitor section of the Queue Details page, view the monitoring metrics of the queue.
NoteFor more information about alert rules, see Create an alert rule.
Delete a queue
On the Queues page, find the queue that you want to delete, click in the Actions column, and then select Delete.
In the Note message, read the note and click OK.
After the queue is deleted, it is not displayed on the Queues page.
WarningBefore you delete a queue, stop sending API requests to the queue. Otherwise, the API requests still incur fees.
After a queue is deleted, you cannot restore the data of the queue.
Send a message
On the Queues page, find the queue that you want to manage, click in the Action column, and then select Send Messages.
In the Send Message section of the Quick Experience page, configure the Message Content and Scheduled Period parameters, and then click Send Message.
The "The message is sent" message appears on the page.
Receive a message
On the Queues page, find the queue that you want to manage, click in the Action column, and then select Send Messages.
Optional. In the Receive Message section of the Quick Experience page, click Edit Parameters of Receiving Messages. In the Edit Parameters of Receiving Messages panel, set the Receive Times and Polling Period parameters, and then click OK.
In the Receive Message section of the Quick Experience page, click Receive Message.
A list of messages appears in the Receive Message section.
Optional. Find a message in the message list and click Details in the Actions column. In the Message Details dialog box, view the information about the message, such as the message content.
Delete a message
On the Queues page, find the queue that you want to manage, click in the Action column, and then select Send Messages.
Optional. In the Receive Message section of the Quick Experience page, click Edit Parameters of Receiving Messages. In the Edit Parameters of Receiving Messages panel, configure the Receive Times and Polling Period parameters, and then click OK.
In the Receive Message section of the Quick Experience page, click Receive Message.
A list of messages appears in the Receive Message section.
In the message list, find the message that you want to delete and click Delete in the Actions column.
In the Note message, read the note and click OK.
After the message is deleted, it is not displayed in the message list.
WarningAfter a message is deleted, you cannot restore the data of the message.