Actions5
- Message Actions
- Queue Actions
Overview
This node interacts with AWS SQS (Simple Queue Service) to perform various queue-related operations. Specifically, the 'Purge' operation deletes all messages in a specified SQS queue, effectively clearing the queue. This is useful for scenarios where you want to quickly remove all pending messages from a queue, such as resetting a queue during development or clearing out old messages in a production environment.
Use Case Examples
- Clearing all messages from a queue before starting a new batch processing job.
- Resetting a queue during testing to ensure no old messages interfere with new tests.
Properties
| Name | Meaning |
|---|---|
| Queue Name or URL | The name of the SQS queue or the full queue URL to identify which queue to purge. |
Output
JSON
jsonsuccess- Indicates whether the purge operation was successful (true if successful).
Dependencies
- Requires AWS SDK for JavaScript (v3) for SQS client operations.
- Requires AWS credentials with permissions to access and purge the specified SQS queue.
Troubleshooting
- If the queue name or URL is incorrect, the node will throw an error indicating the queue does not exist. Verify the queue name, region, and AWS account.
- If AWS credentials are invalid or lack permissions, the node will fail to authenticate or authorize the purge operation. Ensure correct credentials and permissions are set.
- AWS SQS has a restriction that a queue can only be purged once every 60 seconds. Attempting to purge more frequently will result in an error. Wait before retrying.
Links
- AWS SQS PurgeQueue API - Official AWS documentation for the PurgeQueue API used to delete all messages in a queue.