From e47fbb1ff4416cd59f8ffefceb3b3c48a5b41591 Mon Sep 17 00:00:00 2001 From: Grigory Morozov Date: Sat, 8 Feb 2020 02:56:16 +0700 Subject: [PATCH] Support for message attributes --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index aff82bb..fb35f1e 100644 --- a/main.go +++ b/main.go @@ -109,6 +109,7 @@ func convertToEntries(messages []*sqs.Message) []*sqs.SendMessageBatchRequestEnt result[i] = &sqs.SendMessageBatchRequestEntry{ MessageBody: message.Body, Id: message.MessageId, + MessageAttributes: message.MessageAttributes, } } @@ -133,6 +134,7 @@ func moveMessages(sourceQueueUrl string, destinationQueueUrl string, svc *sqs.SQ VisibilityTimeout: aws.Int64(2), WaitTimeSeconds: aws.Int64(0), MaxNumberOfMessages: aws.Int64(10), + MessageAttributeNames: []*string{aws.String(sqs.QueueAttributeNameAll),}, } log.Info(color.New(color.FgCyan).Sprintf("Starting to move messages..."))