Reputation: 3145
Is there a way to move a message from one queue to another? We have a case where messages may end up in the DLQ due to a resource not being available. Once the issue is resolved we'd like to move the message back to the original queue and have it processed again. For our tracking purposes it'd be nice if the original MessageId and SentTimestamp are preserved.
The closest thing I've found is creating a new SendMessageRequest object and copying the contents of the message over. But this will create a brand new message with a new ID and timestamp.
When a message is moved the DLQ the id and timestamp is preserved. Isn't it possible to just reverse this action somehow?
Upvotes: 3
Views: 3138
Reputation: 10566
No. You cannot preserve the message id when moving between queues. SQS gives you the id and the timestamp:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ImportantIdentifiers.html
What you can do is in your application you either:
Upvotes: 3