Skip to content

shaunhardy/sqs-deleter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install dependencies

npm install

Create .env and add AWS credentials

AWS_ACCESS_KEY=XXXXXXXX
AWS_SECRET_KEY=XXXXXXXX

Run node index.js

$ node index.js
? Enter Member ID to target 123456

Or run with environment variable MEMBERID=123456 node index.js

Terminal will scroll through messages from the front of the queue. Deleted messages will be marked as DELETE:.

           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:2750 queueId:178536
           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:5319 queueId:178535
DELETE:    cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:123456 queueId:178595
           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:2750 queueId:178536
           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:5319 queueId:178535
           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:2750 queueId:178536
           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:5319 queueId:178535
           cmd:com.sesamecom.messaging.event.send.queue.email.SendCustomVisitorEmail memberId:2750 queueId:178536

When DELETE: does not appear in the list for 30 seconds then terminate the script. This script is not intended to run through the whole queue as that isn't possible. It will only process messages at the head of the queue.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published