I want to delete messages that have been processed by AWS SQS

Asked 2 years ago, Updated 2 years ago, 86 views

We are building a queue system using AWS SQS.
I am using a queue worker implemented in node.js on Elastic Beanstalk.

We assume the following processing flow.
1. Receive requests
2. Place a message in the queue
3. Processing (registration to DB) is finished
4.Delete Message

Currently, you have not deleted the message, so the message you used is
It remains as DeadLetterQueue, so
I want to solve this problem.

I understand that you can use the deleteMessage in the official document (http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#deleteMessage-property), but
I don't know how to incorporate it into a series of flows.
I look forward to hearing from you.

aws

2022-09-30 21:19

1 Answers

By the way, if you start lambda using the trigger of SQS, you don't need to delete the message.
It's probably cheaper.
Of course, as long as lambda can handle it (such as DB registration).


2022-09-30 21:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.