SQS"接收消息"端点有两个参数,它们似乎做同样的事情,我不明白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
似乎它们都做同样的事情,即指定在获取的消息上应该返回哪些属性。有什么区别吗?如果没有,哪个是首选?
我现在
看到:
AttributeName
返回AWS的属性,如"ApproximateFirstReceiveTimestamp">
MessageAttributeName
返回消息(用户指定(属性