Skip to content

Commit 0311f61

Browse files
Apply suggestions from code review
Co-authored-by: Scott Gerring <scottgerring@users.noreply.github.com>
1 parent 3d5629e commit 0311f61

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

docs/utilities/large_messages.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ offloaded to S3 if they are larger than the maximum allowed size (256 KB).
1515
## Features
1616

1717
- Automatically retrieve the content of S3 objects when SQS or SNS messages have been offloaded to S3.
18-
- Automatically delete the S3 Objects after processing is OK.
18+
- Automatically delete the S3 Objects after processing succeeds.
1919
- Compatible with the batch module (with SQS).
2020

2121
## Background
@@ -78,7 +78,7 @@ stateDiagram-v2
7878
7979
```
8080

81-
SQS and SNS message payload is limited to 256KB. If you wish to send larger message payload, you can leverage the
81+
SQS and SNS message payload is limited to 256KB. If you wish to send messages with a larger payload, you can leverage the
8282
[amazon-sqs-java-extended-client-lib](https://github.com/awslabs/amazon-sqs-java-extended-client-lib)
8383
or [amazon-sns-java-extended-client-lib](https://github.com/awslabs/amazon-sns-java-extended-client-lib) which
8484
offload the message to Amazon S3. See documentation
@@ -89,8 +89,8 @@ When offloaded to S3, the message contains a specific message attribute and the
8989
S3 object (bucket and object key).
9090

9191
This utility automatically retrieves messages which have been offloaded to S3 using the
92-
extended client libraries. Once the message payloads have been processed successful, the
93-
utility also delete the message payloads from S3.
92+
extended client libraries. Once a message's payload has been processed successfully, the
93+
utility deletes the payload from S3.
9494

9595
This utility is compatible with
9696
versions *[1.1.0+](https://github.com/awslabs/amazon-sqs-java-extended-client-lib/releases/tag/1.1.0)*
@@ -377,4 +377,6 @@ If you need to customize this `S3Client`, you can leverage the `LargeMessageConf
377377
or `SNSEvent.SNSRecord` as first parameter.
378378
- The annotation now handles a single message, contrary to the previous version that was handling the complete batch.
379379
It gives more control, especially when dealing with partial failures with SQS (see the batch module).
380-
- The new module only provides an annotation, the `SqsUtils` is not available anymore in this new version.
380+
- The new module only provides an annotation, the `SqsUtils` is not available anymore in this new version.
381+
382+
Also, if you are still using the `powertools-sqs` library for batch processing, consider moving to `powertools-batch` at the same time to remove the dependency on this library completely; it has been deprecated and will be removed in v2.

powertools-large-messages/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1919
<modelVersion>4.0.0</modelVersion>
2020

21+
<description>A suite of utilities for AWS Lambda Functions that makes handling large messages in SQS and SNS easier.</description>
22+
2123
<parent>
2224
<groupId>software.amazon.lambda</groupId>
2325
<artifactId>powertools-parent</artifactId>

powertools-large-messages/src/main/java/software/amazon/lambda/powertools/largemessages/LargeMessageProcessingException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
package software.amazon.lambda.powertools.largemessages;
1616

17+
/**
18+
* Exception that occurs when the utility fails to retrieve the content from S3
19+
*/
1720
public class LargeMessageProcessingException extends RuntimeException {
1821
public LargeMessageProcessingException(String message, Throwable cause) {
1922
super(message, cause);

0 commit comments

Comments
 (0)