SQS ReceiveMessageInput.AttributeNames should be of type MessageSystemAttributeName #2124
Labels
bug
This issue is a bug.
p3
This is a minor priority issue
service-api
This issue is due to a problem in a service API, not the SDK implementation.
workaround-available
Describe the bug
In the SQS API, the
ReceiveMessageInput
fieldAttributeNames
should be of type[]types.MessageSystemAttributeName
instead of[]types.QueueAttributeName
https://github.com/aws/aws-sdk-go-v2/blob/main/service/sqs/api_op_ReceiveMessage.go#L96
The documentation indicates the possible fields that can be listed in this argument include
ApproximateFirstReceiveTimestamp
,ApproximateReceiveCount
,SentTimestamp
, etc. But those are contained in the type MessageSystemAttributeName, whereas the QueueAttributeName type contains attributes pertaining to the whole queue rather than metadata pertaining to individual messages (MaximumMessageSize
,MessageRetentionPeriod
,QueueArn
).This prevents us from requesting specific message attributes to be returned with each SQS message.
Expected Behavior
ReceiveMessage
should be able to accept aReceiveMessageInput
that includes a list of Attributes that we want to receive with each message. These attributes have been enumerated intypes.MessageSystemAttributeName
.Desired:
Current Behavior
Reproduction Steps
Possible Solution
Change the type of
ReceiveMessageInput.AttributeNames
from[]types.QueueAttributeName
to[]types.MessageSystemAttributeName
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.17.13 darwin/amd64
Operating System and version
macOS Big Sur Version 11.7.6
The text was updated successfully, but these errors were encountered: