Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Amazon SQS Do I need to make DeleteMessage request to eliminate message or does some other way exist to delete the message from the queue?

I am new to AWS and wanted to ask a question about Amazon SQS and AWS SDK. From my understanding SQS has visibility timeout feature and after making ReceiveMessage request call the message gets hidden and can not be received for some indicated time.

But what if I want to delete the message from the queue after it gets processed by consumer application ? Do I need to make DeleteMessage request or does some other method exist that I am not aware of, because from what I understand SQS is billed by amount of requests so I would need to pay both for ReceiveMessage and DeleteMessage requests to consume and process the message ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You have to make a DeleteMessage request. There’s no other way for SQS to know you successfully processed the message. The only real alternative is if you are running your code on AWS Lambda with the SQS event trigger integration, at which point Lambda just makes those SQS API calls for you.


From the SQS pricing page:

API Actions | Every Amazon SQS action counts as a request.

So yes, you do apparently pay for every request, after you’ve used the first 1 million free requests you get each month.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading