
Aws Sdk Java V2 Messaging
Wire Java services to Amazon SQS and SNS with SDK v2 patterns for send, receive, batching, FIFO, DLQ, and large-payload S3 offload.
Overview
AWS SDK Java v2 Messaging is an agent skill for the Build phase that maps Amazon SQS and SNS operations and Java SDK v2 client patterns for solo builders integrating async messaging.
Install
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-messagingWhat is this skill?
- Official-aligned reference for SqsClient and SNS Java SDK v2 models
- Core ops: CreateQueue, SendMessage, SendMessageBatch, ReceiveMessage, DeleteMessage, ListQueues
- Long polling, visibility timeout, DLQ, and FIFO ordering/dedup notes
- Large message handling via S3 for payloads over 256KB
- Pointers to AWS doc-sdk-examples javav2 SQS and SNS trees
- 256KB large-message threshold referenced for S3 offload
- Six core SQS operations enumerated in reference
- Sources: AWS Java SDK v2 SQS/SNS example repos and developer guides
Adoption & trust: 1.1k installs on skills.sh; 271 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need correct SQS and SNS Java v2 calls, batching, and edge cases like DLQ or oversized messages without digging through scattered AWS example repos.
Who is it for?
Indie Java backend devs adding queues, topics, or workers on AWS SDK v2 in existing services.
Skip if: Python or Node-only stacks, pure Kafka/Rabbit tutorials, or teams wanting full Terraform topology without application code.
When should I use this skill?
Implementing or debugging Amazon SQS and SNS with AWS SDK for Java 2.x, including batches, FIFO, DLQ, long polling, or large payloads.
What do I get? / Deliverables
You implement messaging code with the right SDK clients, operations, and feature flags aligned to official AWS developer guides and examples.
- SqsClient/SNS client usage aligned to official operations
- Queue and topic configuration notes (FIFO, DLQ, polling)
- Batch and large-message handling approach documented in code
Recommended Skills
Journey fit
Build integrations is where messaging clients, queue policies, and publisher code land before Ship security review and Operate monitoring. Integrations reflects AWS SDK client wiring and queue/topic semantics rather than pure domain entity modeling.
How it compares
Documentation-shaped integration skill—not an MCP server bridge and not a managed queue UI product.
Common Questions / FAQ
Who is aws-sdk-java-v2-messaging for?
Java developers on AWS SDK 2.x who need SQS and SNS implementation detail while coding integrations with an AI agent.
When should I use aws-sdk-java-v2-messaging?
Use it in Build integrations when creating queues, publishing to topics, consuming with long polling, configuring DLQ or FIFO behavior, or offloading large messages to S3.
Is aws-sdk-java-v2-messaging safe to install?
Review the Security Audits panel on this page; messaging work touches AWS credentials and live queues you must scope with least privilege.
SKILL.md
READMESKILL.md - Aws Sdk Java V2 Messaging
# AWS SQS & SNS Official Documentation Reference This file contains reference information extracted from official AWS resources for the AWS SDK for Java 2.x messaging patterns. ## Source Documents - [AWS Java SDK v2 Examples - SQS](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/example_code/sqs) - [AWS Java SDK v2 Examples - SNS](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/example_code/sns) - [AWS SQS Developer Guide](https://docs.aws.amazon.com/sqs/latest/dg/) - [AWS SNS Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/) ## Amazon SQS Reference ### Core Operations - **CreateQueue** - Create new SQS queue - **DeleteMessage** - Delete individual message from queue - **ListQueues** - List available queues - **ReceiveMessage** - Receive messages from queue - **SendMessage** - Send message to queue - **SendMessageBatch** - Send multiple messages to queue ### Advanced Features - **Large Message Handling** - Use S3 for messages larger than 256KB - **Batch Operations** - Process multiple messages efficiently - **Long Polling** - Reduce empty responses with `waitTimeSeconds` - **Visibility Timeout** - Control message visibility during processing - **Dead Letter Queues (DLQ)** - Handle failed messages - **FIFO Queues** - Ensure message ordering and deduplication ### Java SDK v2 Key Classes ```java // Core clients and models software.amazon.awssdk.services.sqs.SqsClient software.amazon.awssdk.services.sqs.model.* software.amazon.awssdk.services.sqs.model.QueueAttributeName ``` ## Amazon SNS Reference ### Core Operations - **CreateTopic** - Create new SNS topic - **Publish** - Send message to topic - **Subscribe** - Subscribe endpoint to topic - **ListSubscriptions** - List topic subscriptions - **Unsubscribe** - Remove subscription ### Advanced Features - **Platform Endpoints** - Mobile push notifications - **SMS Publishing** - Send SMS messages - **FIFO Topics** - Ordered message delivery with deduplication - **Filter Policies** - Filter messages based on attributes - **Message Attributes** - Enrich messages with metadata - **DLQ for Subscriptions** - Handle failed deliveries ### Java SDK v2 Key Classes ```java // Core clients and models software.amazon.awssdk.services.sns.SnsClient software.amazon.awssdk.services.sns.model.* software.amazon.awssdk.services.sns.model.MessageAttributeValue ``` ## Best Practices from AWS ### SQS Best Practices 1. **Use Long Polling**: Set `waitTimeSeconds` (10-40 seconds) to reduce empty responses 2. **Batch Operations**: Use `SendMessageBatch` for efficiency 3. **Visibility Timeout**: Set appropriately based on processing time 4. **Handle Duplicates**: Implement idempotent processing for retries 5. **Monitor Queue Depth**: Use CloudWatch for monitoring 6. **Implement DLQ**: Route failed messages for analysis ### SNS Best Practices 1. **Use Filter Policies**: Reduce noise by filtering messages 2. **Message Attributes**: Add metadata for routing decisions 3. **Retry Logic**: Handle transient failures gracefully 4. **Monitor Failed Deliveries**: Set up CloudWatch alarms 5. **Security**: Use IAM policies for access control 6. **FIFO Topics**: Use when order and deduplication are critical ## Error Handling Patterns ### Common SQS Errors - **QueueDoesNotExistException**: Verify queue URL - **MessageNotInflightException**: Check message visibility - **OverLimitException**: Implement backoff/retry logic - **InvalidAttributeValueException**: Validate queue attributes ### Common SNS Errors - **NotFoundException**: Verify topic ARN - **InvalidParameterException**: Validate subscription parameters - **InternalFailureException**: Implement retry logic - **AuthorizationErrorException**: Check IAM permissions ## Integration Patterns ### Spring Boot Integration - Use `@Service` classes for business logic - Inject `SqsClient` and `SnsClient` via constructor injection - Configure clients with `@Configuration` beans - Use `@Value` for externalizing configu