Skip to content

This is a companion source code for Amazon Compute Blog - Enhancing message-based applications with Message Attributes. The samples in this project demonstrate how to use Message Attributes feature of Amazon Simple Queue Service (SQS).

License

Notifications You must be signed in to change notification settings

aws-samples/amazon-sqs-message-attributes-starter-kit

Amazon SQS - Message Attributes starter kit

This is a companion source code for Amazon Compute Blog - Enhancing message-based applications with Message Attributes. The samples in this project demonstrate how to use Message Attributes feature of Amazon Simple Queue Service (SQS).

Pre-requisites

  1. JDK 8 or above
  2. IDE for e.g. Eclipse or Spring Tools or Intellij IDEA
  3. Apache Maven
  4. Access to AWS Environment

AWS Service Requirements

  1. 1 Amazon SQS Queue of type Standard
  2. 1 Amazon SQS Queue of type FIFO

Build Instructions

  1. Clone this starter kit to your Laptop / MacBook
  2. It has Maven nature, so you can import it to your IDE
  3. Create an SQS queue of type Standard. Make a note of its URL and update relevant Java classes per inline instructions in the code
  4. Create an SQS queue of type FIFO. Make a note of its URL and update relevant Java classes per inline instructions in the code

Functional Overview

Class Purpose
SendMessageWithAttributes.java Send message attributes to a standard queue.
SendMessageWithAttributes_FIFO.java Send message attributes to a FIFO queue.
SendMessageWithAttributes_AWSXRay_Tracing.java Send message attributes to a standard queue and with AWS X-Ray Tracing enabled.
SendMessageWithAttributes_AWSXRay_Tracing_FIFO.java Send message attributes to a FIFO queue and with AWS X-Ray Tracing enabled.
ReceiveMessage.java Receive message from a standard queue.
ReceiveMessage_FIFO.java Receive message from a FIFO queue.
ReceiveMessage_AWSXRay_Tracing.java Receive message from a standard queue and print AWSTraceHeader.

Test Instructions

  1. Update Java classes with appropriate SQS queue URL
  2. Run the programs in your IDE

Tags

Amazon SQS, Message Attributes

License Summary

This sample code is made available under the MIT license. See the LICENSE file.

About

This is a companion source code for Amazon Compute Blog - Enhancing message-based applications with Message Attributes. The samples in this project demonstrate how to use Message Attributes feature of Amazon Simple Queue Service (SQS).

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages