edit-icon download-icon

Queue operations

Last Updated: Apr 01, 2017

CreateQueue

As an example, to create a queue named MyQueue on Alibaba Cloud MNS as follows.

  1. Click Create queue.

  2. Specify the attributes of the queue on the displayed dialog box, then click OK to create the queue.

    mns_createqueue_pic

SetQueueAttributes

After MyQueue is created successfully, set the attributes of MyQueue.

  1. Click Modification settings in the action list to the right of MyQueue.

  2. Modify attributes according to your demands on the dialog box displayed on the console, then click OK.

    mns_setqueueattributes_pic

GetQueueAttributes

After MyQueue is created successfully, obtain the queue attributes of MyQueue.

By default, basic queue attributes are displayed on the console. You can view them directly.

mns_getqueueattributes_pic

ListQueue

List all queues with a given prefix under an account.

Input the prefix in the Query Queue box, then click Search. All queues with the specified prefix are listed on the console.

mns_listqueue_pic

DeleteQueue

After MyQueue is created successfully, delete MyQueue.

Click Delete to the right of MyQueue and click the Delete on dialog box to finish the deletion.

mns_deletequeeu_pic

SendMessage

After MyQueue is created successfully, send a message to MyQueue.

Click Send Message to the right of MyQueue and input the message in the displayed dialog box, then click Send message.

mns_sendmessage_pic

ReceiveMessage

After MyQueue is created successfully, get the message from MyQueue and compare it with the message you sent to MyQueue. Confirm the consistency between the 2 messages and record the returned ReceiptHandle.

Click Receive message to the right of MyQueue to check attributes of the received message displayed in dialog box.

mns_receive_message_pic

DeleteMessage

After verifying that the message is correct, use the ReceiptHandle you obtained in the previous step to delete the received message.

In the Receive Message dialog box, select Auto delete received messages, and click Receive message. The current message is deleted, and the next message is obtained.

mns_deletemessage_pic

Thank you! We've received your feedback.