SQS Queue Operations

SQS Queue Operations

SQS queue operations

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed how to create an SQS queue.

https://cloudaffaire.com/how-to-create-an-sqs-queue/

In this blog post, we will discuss some basic operations like sending, receiving and deleting a message to an SQS queue.

SQS queue operations:

Step 1: Login to AWS console and navigate to ‘SQS’.

SQS Queue Operations

Step 2: Select your queue and from ‘Queue Actions’ click ‘Send a Message’.

SQS Queue Operations

Step 3: Provide message body, message group id and message deduplication id.

SQS Queue Operations

Note: The message group ID is the tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are always processed one by one, in a strict order relative to the message group (however, messages that belong to different message groups might be processed out of order). The message deduplication ID is the token used for deduplication of sent messages. If a message with a particular message deduplication ID is sent successfully, any messages sent with the same message deduplication ID are accepted successfully but aren’t delivered during the 5-minute deduplication interval.

Next, we are going to add some attributes to our message.

Step 4: Click on the ‘Message Attributes’ tab and provide a message attribute. Click ‘Send Message’.

C:\Users\user\AppData\Local\Temp\SNAGHTML266c9fb8.PNG

We have successfully sent a message to our queue.

SQS Queue Operations

Step 5: To view the message, select your queue and from ‘Queue Actions’ click ‘View/Delete Messages’.

SQS Queue Operations

To view the message in AWS console, click ‘Start Polling for Messages’

SQS Queue Operations

Our message successfully polled. You can view additional details like message attribute by clicking ‘View Details’.

SQS Queue Operations

Step 6: To delete a message, select the message you want to delete and click ‘Delete Message’.

SQS Queue Operations

Confirm the deletion by clicking ‘Yes, Delete Checked Messages’.

SQS Queue Operations

Hope you have enjoyed this article. In the next blog post, we will discuss SQS queue configuration options.

To get more details on AWS SQS, please refer below AWS documentation

https://docs.aws.amazon.com/sqs/index.html

 

Leave a Reply

Close Menu