Skip to content

Java V2: migrate v1 sqs example that compares single messaging to batch messaging #7509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .doc_gen/metadata/sqs_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,20 @@ sqs_Scenario_SendReceiveBatch:
- description: Use the wrapper functions to send and receive messages in batches.
snippet_tags:
- python.example_code.sqs.Scenario_SendReceiveBatch
Java:
versions:
- sdk_version: 2
github: javav2/example_code/sqs
sdkguide:
excerpts:
- description: Compare single-message SQS operations with automatic batching.
snippet_tags:
- sqs.java2.batch_demo.main
- description: Create functions to wrap &SQS; message functions and use them to send and receive messages in batches.
snippet_tags:
- sqs.java2.sendRecvBatch.main
services:
sqs: {CreateQueue, DeleteQueue, SendMessageBatch, ReceiveMessage, DeleteMessageBatch}
sqs: {CreateQueue, DeleteQueue, SendMessageBatch, SendMessage, ReceiveMessage, DeleteMessageBatch, DeleteMessage}
sqs_GetQueueAttributes:
languages:
.NET:
Expand Down
17 changes: 17 additions & 0 deletions javav2/example_code/sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ functions within the same service.
- [Manage large messages using S3](src/main/java/com/example/sqs/SqsExtendedClientExample.java)
- [Process S3 event notifications](../s3/src/main/java/com/example/s3/ProcessS3EventNotification.java)
- [Publish messages to queues](../../usecases/topics_and_queues/src/main/java/com/example/sns/SNSWorkflow.java)
- [Send and receive batches of messages](src/main/java/com/example/sqs/SimpleProducerConsumer.java)
- [Use the Amazon SQS Java Messaging Library to work with the JMS interface](../sqs-jms/src/main/java/com/example/sqs/jms/stdqueue/TextMessageSender.java)
- [Work with queue tags](src/main/java/com/example/sqs/TagExamples.java)

Expand Down Expand Up @@ -130,6 +131,22 @@ This example shows you how to do the following:
<!--custom.scenarios.sqs_Scenario_TopicsAndQueues.start-->
<!--custom.scenarios.sqs_Scenario_TopicsAndQueues.end-->

#### Send and receive batches of messages

This example shows you how to do the following:

- Create an Amazon SQS queue.
- Send batches of messages to the queue.
- Receive batches of messages from the queue.
- Delete batches of messages from the queue.

<!--custom.scenario_prereqs.sqs_Scenario_SendReceiveBatch.start-->
<!--custom.scenario_prereqs.sqs_Scenario_SendReceiveBatch.end-->


<!--custom.scenarios.sqs_Scenario_SendReceiveBatch.start-->
<!--custom.scenarios.sqs_Scenario_SendReceiveBatch.end-->

#### Use the Amazon SQS Java Messaging Library to work with the JMS interface

This example shows you how to use the Amazon SQS Java Messaging Library to work with the JMS interface.
Expand Down
Loading
Loading