aws-sdk-java-v2-messaging

Implement AWS SQS and SNS messaging patterns with Java 2.x.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/rizaldiem/digital-invitation-web_V2 --skill aws-sdk-java-v2-messaging-rizaldiem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-java-v2-messaging
Source: https://github.com/rizaldiem/digital-invitation-web_V2/tree/main/.windsurf/skills/aws-sdk-java-v2-messaging
Command: npx skills add https://github.com/rizaldiem/digital-invitation-web_V2 --skill aws-sdk-java-v2-messaging-rizaldiem

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about aws-sdk-java-v2-messaging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure AWS SDK for Java 2.x SQS and SNS clients?

Configure AWS SDK for Java 2.x SQS and SNS clients by instantiating SqsClient and SnsClient with region, credentials, and HTTP client options. This setup ensures reliable message queuing and pub/sub operations within your Java application.

What is the best way to subscribe an SQS queue to an SNS topic in Java?

The best way to subscribe an SQS queue to an SNS topic in Java is by creating both resources and configuring the subscription to route pub/sub events into the queue, decoupling message producers from multiple consumer processors.

How do I handle FIFO ordering and deduplication in Amazon SQS using Java?

Handle FIFO ordering and deduplication in Amazon SQS using Java by configuring FIFO queues with message group IDs and deduplication IDs, ensuring strict message ordering and preventing duplicate processing for critical workflows like payments.

Can I test SQS and SNS messaging in Spring Boot with LocalStack or Testcontainers?

Yes, you can test SQS and SNS messaging in Spring Boot using LocalStack or Testcontainers. These tools provide local AWS environment emulation, allowing you to validate message producers, consumers, and bean configurations without hitting live AWS.

How do I configure a dead letter queue for failed SQS messages in Java?

Configure a dead letter queue (DLQ) for failed SQS messages in Java by creating a DLQ and setting a redrive policy on the source queue, routing messages exceeding maximum receive counts to the DLQ for troubleshooting failed processing.

Does AWS SDK for Java 2.x support batch operations and long polling for SQS?

Yes, AWS SDK for Java 2.x supports batch operations and long polling for SQS. Batch operations send, receive, or delete multiple messages efficiently, while long polling reduces empty responses by maintaining connections until messages arrive.