All Products
Search
Document Center

Simple Message Queue (formerly MNS):Manage queues in the console

Last Updated:Oct 29, 2024

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

  1. Log on to the SMQ console.

  2. In the left-side navigation pane, choose Queue Model > Queues.

  3. In the top navigation bar, select a region.

  4. On the Queues page, click Create Queue.

  5. 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

  1. On the Queues page, find the queue that you want to modify, click More in the Actions column, and then select Edit.

  2. 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

  1. 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

  1. On the Queues page, find the queue that you want to view and click Details in the Actions column.

  2. On the Queue Details page, you can view the details of the queue.

View the endpoints of a queue

  1. On the Queues page, find the queue that you want to view and click Details in the Actions column.

  2. 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.

    Note

    You can send HTTP or HTTPS requests to access the endpoints.

View the monitoring metrics of a queue

  1. On the Queues page, find the queue that you want to view, click More in the Actions column, and then select Cloud Monitor.

  2. In the Cloud Monitor section of the Queue Details page, view the monitoring metrics of the queue.

    image

    Note

    For more information about alert rules, see Create an alert rule.

Delete a queue

  1. On the Queues page, find the queue that you want to delete, click More in the Actions column, and then select Delete.

  2. In the Note message, read the note and click OK.

    After the queue is deleted, it is not displayed on the Queues page.

    Warning
    • Before 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

  1. On the Queues page, find the queue that you want to manage, click More in the Action column, and then select Send Messages.

  2. 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

  1. On the Queues page, find the queue that you want to manage, click More in the Action column, and then select Send Messages.

  2. 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.

  3. In the Receive Message section of the Quick Experience page, click Receive Message.

    A list of messages appears in the Receive Message section.

  4. 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

  1. On the Queues page, find the queue that you want to manage, click More in the Action column, and then select Send Messages.

  2. 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.

  3. In the Receive Message section of the Quick Experience page, click Receive Message.

    A list of messages appears in the Receive Message section.

  4. In the message list, find the message that you want to delete and click Delete in the Actions column.

  5. In the Note message, read the note and click OK.

    After the message is deleted, it is not displayed in the message list.

    Warning

    After a message is deleted, you cannot restore the data of the message.