Receive and delete a message (console) - Amazon Simple Queue Service

Receive and delete a message (console)

After you send messages to a queue, you can receive and delete them. When you request messages from a queue, you cannot specify which messages to retrieve. Instead, you specify the maximum number of messages (up to 10) that you want to retrieve.

Note

Because Amazon SQS is a distributed system, a queue with very few messages might display an empty response to a receive request. In this case, rerun the request to get your message. Depending on your application's needs, you might have to use short or long polling to receive messages.

Amazon SQS doesn't automatically delete a message after retrieving it for you, in case you don't successfully receive the message (for example, if the consumers fail or you lose connectivity). To delete a message, you must send a separate request which acknowledges that you've successfully received and processed the message. Note that you must receive a message before you can delete it.

Note

After receiving messages from the Amazon SQS console, the console immediately sets the messages back to visible, so that the messages can be received again.

For more information on API options for recieving and deleting messages, see the Amazon SQS API Reference Guide.

To receive and delete a message (console)
  1. Open the Amazon SQS console at https://console.aws.amazon.com/sqs/.

  2. In the navigation pane, choose Queues.

  3. On the Queues page, choose a queue.

  4. Choose Send and receive messages.

    The console displays the Send and receive messages page.

  5. Choose Poll for messages.

    Amazon SQS begins to poll for messages in the queue. The progress bar on the right side of the Receive messages section displays the duration of polling.

    The Messages section displays a list of the received messages. For each message, the list displays the message ID, Sent date, Size, and Receive count.

  6. To delete messages, choose the messages that you want to delete and choose Delete.

  7. In the Delete Messages dialog box, choose Delete.