This topic describes how to manage queues in the Message Service (MNS) console.

Prerequisites

You must meet the following prerequisites:

Create a queue

To create a queue, perform the following steps. In this example, the name of the queue is MyQueue.

  1. In the top navigation bar of the MNS console, select a region, for example, China (Hangzhou).
  2. In the left-side navigation pane, select Queues.
  3. In the upper-right corner of the Queues page, click Create Queue.
  4. In the Create Queue dialog box that appears, specify the parameters and click OK.create a queue

Modify a queue

After you create MyQueue, you can modify the queue based on your needs.

  1. In the queue list of the Queues page, find MyQueue. In the Action column, click Modify.
  2. In the Modify Queue dialog box that appears, modify the values of parameters and click OK.

View queue information

After you create MyQueue, you can view the queue information.

  1. By default, all parameters of a queue are displayed in the console. You can view the details of the queue in the queue list.
  2. In the upper-right corner of the Queues page, click Get Endpoint to view the Internet endpoint and intranet endpoint of MNS in the selected region.get endpoint

Query a queue list

You can specify a keyword to search for all queues whose names start with the keyword. The keyword is case-sensitive.

  1. Enter a keyword (such as test) in the Queue Query search bar, and click Search. All queues that meet the specified search condition are displayed in the console.

    queryqueue

Delete a queue

If you no longer need MyQueue, you can delete it in the console.

  1. Find MyQueue in the queue list. In the Action column, click Delete.
  2. In the Prompt dialog box that appears, read the prompt and click OK.delete a queue

Send messages

After you create MyQueue, you can send messages to the queue.

  1. On the Queues page of the console, find MyQueue. In the Action column, click Send Message.
  2. In the Send Message dialog box that appears, enter a message and click Send Message.queuesendmessage

Receive messages

After you create MyQueue, you can receive messages from the queue. You can check the message content to ensure that the messages sent to the queue and the messages you receive are the same.

  1. On the Queues page of the console, find MyQueue. In the Action column, click Receive Message.
  2. In the Receive Message dialog box that appears, you can view the details of the message to be received. MNS automatically receives the message. If you want to receive other messages that are sent to the queue, click Receive Message.queue receive messsage

Delete messages

You can delete messages from the queue after verifying the messages.

  1. In Receive Message dialog box, select Auto delete received messages and click Receive Message. MNS automatically deletes the current received message and retrieves the next message.