Last active
August 29, 2015 14:17
-
-
Save cosminonea/9d8da692377941843fe8 to your computer and use it in GitHub Desktop.
AWS SQS - republish failed messages from error queue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Receive-SQSMessage -Region eu-west-1 ` | |
-QueueUrl $error-queue-url ` | |
-MaxNumberOfMessages 10 | | |
ForEach-Object { ` | |
Send-SQSMessage -Region eu-west-1 ` | |
-QueueUrl $queue-url ` | |
-MessageBody $_.Body ` | |
-MessageAttributes $_.Attributes | |
Remove-SQSMessage -Region eu-west-1 ` | |
-QueueUrl $error-queue-url ` | |
-ReceiptHandle $_.ReceiptHandle -Force | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment