Ric*_*ich 3 amazon-sqs amazon-web-services
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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
看起来它们都做同样的事情,即指定在获取的消息上应返回哪些属性。有什么区别吗?如果不是,哪个是首选?
我现在明白了:
AttributeName返回 AWS 的属性,例如“ApproximateFirstReceiveTimestamp”
MessageAttributeName返回消息(用户指定)属性
| 归档时间: |
|
| 查看次数: |
3823 次 |
| 最近记录: |