What problem does it solve?
Provides a clear, reusable set of patterns and examples to implement reliable message queuing and pub/sub using Amazon SQS and SNS with the AWS SDK for Java 2.x, removing uncertainty around client configuration, queue/topic setup, and integration into Java applications.
Core Features & Use Cases
- Client Setup & Configuration: Examples for creating SqsClient and SnsClient with region, credentials, and HTTP client options.
- Queue & Topic Management: Create, list, and configure standard and FIFO queues/topics, including DLQ, attributes, and naming constraints.
- Message Operations & Patterns: Send/receive (including long polling), batch operations, message attributes, FIFO ordering/deduplication, and SNS-to-SQS subscriptions.
- Integration & Testing: Spring Boot bean configuration, scheduled listeners, LocalStack/Testcontainers testing patterns, and CloudWatch monitoring recommendations.
- Use Case: Build an order-processing pipeline that publishes events to an SNS topic, routes events to multiple SQS queues for different processors, enforces FIFO ordering for payments, and uses DLQs for failed messages.
Quick Start
Use the aws-sdk-java-v2-messaging skill to generate example Java 2.x code that creates an SQS queue, publishes a message to an SNS topic, and subscribes the queue to the topic for testing.