Search code examples
amazon-web-servicesamazon-sqs

What's the difference between MessageAttributeValue and MessageSystemAttributeValue


I want to send custom attribute values along with message in the SQS queue. I've come across MessageAttributeValue and MessageSystemAttributeValue. Both have almost same definition in AWS documentation.

What's the difference between them?

MessageAttributeValue documentation MessageSystemAttributeValue documentation


Solution

  • The difference is on the use:

    • Message attribute: You can use message attributes to attach custom metadata to Amazon SQS messages for your applications.
    • Message system attribute: You can use message system attributes to store metadata for other Amazon services (currently, the only supported message system attribute is AWSTraceHeader. And its value must be a correctly formatted Amazon X-Ray trace header string).