SQS“ ReceiveMessage”端点具有两个似乎做相同事情的参数,而且我不理解API文档。有人可以解释其中的区别:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html
AttributeName.N
A list of attributes that need to be returned along with each message
MessageAttributeName.N
The name of the message attribute, where N is the index.
...
When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All
似乎它们都做相同的事情,即指定应在获取的消息上返回哪些属性。 有什么区别吗?如果没有,那是首选?
答案 0 :(得分:1)
我现在看到了:
AttributeName
返回AWS的属性,例如“ roximatefirstreceivetimestamp”
MessageAttributeName
返回消息(用户指定)属性