aws / aws-sdk-go-v2

AWS SDK for the Go programming language.
https://aws.github.io/aws-sdk-go-v2/docs/
Apache License 2.0
2.68k stars 651 forks source link

backfill @required on ChangeMessageVisibilityBatchRequestEntry.VisibilityTimeout #2767

Closed lucix-aws closed 3 months ago

lucix-aws commented 3 months ago

relates https://github.com/aws/aws-sdk/issues/527 closes #2250

This is a stopgap to unblock customers affected by this issue. An upstream modeling fix still needs to be pursed with the SQS team.

Fix issue where SDK could not send a VisibilityTimeout of 0 in a ChangeMessageVisibilityBatchRequestEntry.

        &sqs.ChangeMessageVisibilityBatchInput{
            QueueUrl: aws.String("foo"),
            Entries: []types.ChangeMessageVisibilityBatchRequestEntry{
                {   
                    Id:            aws.String("bar"),
                    ReceiptHandle: aws.String("baz"),
                },  
            },  
        },

before

{"Entries":[{"Id":"bar","ReceiptHandle":"baz"}],"QueueUrl":"foo"}

after

{"Entries":[{"Id":"bar","ReceiptHandle":"baz","VisibilityTimeout":0}],"QueueUrl":"foo"}