【问题标题】:What is the difference between "MessageAttributeName.N" and "AttributeName.N" in SQS ReceiveMessageSQS ReceiveMessage中的“MessageAttributeName.N”和“AttributeName.N”有什么区别
【发布时间】:2019-06-20 17:07:53
【问题描述】:

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

似乎它们都做同样的事情,即指定应在获取的消息上返回哪些属性。 有什么区别吗?如果不是,哪个是首选?

【问题讨论】:

    标签: amazon-web-services amazon-sqs


    【解决方案1】:

    我现在看到了:

    AttributeName 返回 AWS 的属性,例如“ApproximateFirstReceiveTimestamp”

    MessageAttributeName 返回消息(用户指定)属性

    【讨论】:

      猜你喜欢
      • 2020-02-25
      • 2020-06-05
      • 2012-11-20
      • 2016-09-03
      • 2014-09-04
      • 2022-07-22
      • 2016-07-21
      • 2010-10-02
      • 2011-12-12
      相关资源
      最近更新 更多