go-sqs-poller icon indicating copy to clipboard operation
go-sqs-poller copied to clipboard

add MessageAttributeNames to sqs.ReceiveMessageInput.

Open yoanp opened this issue 4 years ago • 3 comments

I want to process by checking the attribute included in each message. Please review adding MessageAttributeNames to the worker.go Start method as shown below.

params := &sqs.ReceiveMessageInput{
    QueueUrl:            aws.String(worker.Config.QueueURL), // Required
    MaxNumberOfMessages: aws.Int64(worker.Config.MaxNumberOfMessage),
    AttributeNames: []*string{
        aws.String("All"), // Required
    },
    MessageAttributeNames: []*string{
        aws.String(sqs.QueueAttributeNameAll),
    },
    WaitTimeSeconds: aws.Int64(worker.Config.WaitTimeSecond),
}

yoanp avatar Dec 23 '20 05:12 yoanp

Also need this..

melneff avatar Aug 17 '21 19:08 melneff

I created a PR for this: https://github.com/h2ik/go-sqs-poller/pull/16

aherve avatar Aug 17 '21 19:08 aherve

Hi there, my fork supports MessageAttributeNames, check it out https://github.com/aint/go-sqs-poller.

aint avatar Aug 07 '22 16:08 aint