This article describes how to manage queues in the MNS console.

Prerequisites

Activate Message Service

Create a queue

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, click Create Queue.
  5. In the Create Queue dialog box, set the following parameters and click OK.
    • Name: the name of the queue.
    • Maximum Message Length: the maximum body 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.
    • Visibility Timeout Period: the duration for which a message stays in the Inactive state after the message is received from the queue.
    • Message Retention Period: the maximum duration for which a message exists in the queue. After the specified retention period, the message is deleted whether the message is received or not.
    • Scheduled Period: the period after which all messages sent to the queue are consumed.
    • Enable Logging Feature: specifies whether to enable the logging feature.
    The queue is displayed on the Queues page.

Edit a queue

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue that you want to edit. Choose More > Edit in the Actions column.
  5. In the Edit Parameter of Queue dialog box, modify the queue settings, and click OK.
    In the Basic Information section of the Queue Details page, you can view the modified queue settings.

Search for queues

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. In the search box of the Queues page, enter the prefix of the queue name, for example, 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. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue that you want to view. Click Details in the Actions column.
  5. On the Queue Details page, you can view the details of the queue.

View the endpoints of a queue

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue that you want to view. Click Details in the Actions column.
  5. In the Endpoint section of the Queue Details page, view the endpoints of the queue. The network types of these endpoints include Internet Access and Internal Access.
    Note You can use HTTP or HTTPS to access the endpoints.

View the monitoring metrics of a queue

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue that you want to view. Choose More > Cloud Monitor in the Actions column.
  5. In the Cloud Monitor section of the Queue Details page, view the monitoring metrics of the queue.
    Queue monitoring metrics
    Note For more information, see Create a threshold-triggered alert rule.

Delete a queue

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue that you want to delete. Choose More > Delete in the Actions column.
  5. In the Note message, read the note and click OK.
    The queue is deleted from the Queues page.

Send a message

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue to which you want to send a message. Choose More > Send Messages in the Action column.
  5. In the Send Message section of the Quick Experience page, specify the Message Content and Scheduled Period parameters, and then click Send Message.
    "The message is sent" appears on the page.

Receive a message

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue from which you want to receive a message. Choose More > Send Messages in the Action column.
  5. Optional:In the Receive Message section of the Quick Experience page, click Edit Parameters of Receiving Messages. In the Edit Parameters of Receiving Messages dialog box, specify the Receive Times and Polling Period parameters, and then click OK.
  6. In the Receive Message section of the Quick Experience page, click Receive Message.
    A list of received messages are displayed in the Receive Message section.
  7. Optional:In the message list, find the message that you want to view. Click Details in the Actions column. In the Message Details dialog box, view the message details, such as message content.

Delete a message

  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Queues.
  3. In the top navigation bar, select a region.
  4. On the Queues page, find the queue. Choose More > Send Messages in the Action column.
  5. Optional:In the Receive Message section of the Queue Experience page, click Edit Parameters of Receiving Messages. In the Edit Parameters of Receiving Messages dialog box, specify the Receive Times and Polling Period parameters, and click OK.
  6. In the Receive Message section of the Queue Experience page, click Receive Message.
    A list of messages appears in the Receive Message section.
  7. In the message list, find the message that you want to delete. Click Delete in the Actions column.
  8. In the Note message, read the note and click OK.
    The message is deleted from the message list.