Skip to content

Commit

Permalink
Support for message attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
negrusti authored Feb 7, 2020
1 parent 5c54491 commit e47fbb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func convertToEntries(messages []*sqs.Message) []*sqs.SendMessageBatchRequestEnt
result[i] = &sqs.SendMessageBatchRequestEntry{
MessageBody: message.Body,
Id: message.MessageId,
MessageAttributes: message.MessageAttributes,
}
}

Expand All @@ -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..."))
Expand Down

0 comments on commit e47fbb1

Please sign in to comment.