awslabs / amazon-sqs-java-temporary-queues-client

An Amazon SQS client that supports creating lightweight, automatically-deleted temporary queues, for use in common messaging patterns such as Request/Response. See http://aws.amazon.com/sqs.
Apache License 2.0
93 stars 28 forks source link
amazon-sqs queues request-response sqs sqs-clent

Amazon SQS Java Temporary Queue Client

The Temporary Queue Client lets you create lightweight, temporary queues that are deleted automatically when they are no longer in use. You can use the Temporary Queue Client for use in common messaging patterns such as Request-Response.

This library provides two complementary interfaces for two-way communication through queues:

To implement this pattern efficiently, the AmazonSQSRequester client creates temporary queues that hold response messages. The temporary queue architecture scales to an arbitrary number of message producer runtimes. There is no risk of response messages being consumed by the wrong client.

Temporary queues are also automatically deleted if the clients that created them die ungracefully. By default, these internal queues are created with the queue name prefix __RequesterClientQueues__. You can configure this prefix when you build the requester client.

Getting Started

  1. Before you begin, register for an AWS account. For more information about creating an AWS account and retrieving your AWS credentials, see AWS Account and Credentials in the AWS SDK for Java Developer Guide.
  2. Sign in to the Amazon SQS console.
  3. To use the Temporary Queue client, you'll need Java 8 (or later) and Maven 3.
  4. Download the latest release or add a Maven dependency into your pom.xml file:

    Version 2.x

    <dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>amazon-sqs-java-temporary-queues-client</artifactId>
    <version>2.0.1</version>
    <type>jar</type>
    </dependency>

Version 1.x

  <dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>amazon-sqs-java-temporary-queues-client</artifactId>
    <version>1.2.4</version>
    <type>jar</type>
  </dependency>
  1. Explore the code examples.
  2. Read the documentation.

Feedback

License

This library is licensed under the Apache 2.0 License.

See LICENSE and NOTICE for more information.