Skip to content

Commit 7105b0e

Browse files
committed
Address some review comments
1 parent cdce3e2 commit 7105b0e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

powertools-sqs/src/main/java/software/amazon/lambda/powertools/sqs/SqsUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public final class SqsUtils {
4545
private static S3Client s3Client;
4646

4747
// The attribute on an SQS-FIFO message used to record the message group ID
48-
private static final String MessageGroupIdKey = "MessageGroupId";
48+
private static final String MESSAGE_GROUP_ID = "MessageGroupId";
4949

5050
private SqsUtils() {
5151
}
@@ -519,7 +519,7 @@ public static <R> List<R> batchProcessor(final SQSEvent event,
519519
// If we are trying to process a message that has a messageGroupId, we are on a FIFO queue. A failure
520520
// now stops us from processing the rest of the batch.
521521
String messageGroupId = message.getAttributes() != null ?
522-
message.getAttributes().get(MessageGroupIdKey) : null;
522+
message.getAttributes().get(MESSAGE_GROUP_ID) : null;
523523

524524
if (messageGroupId != null) {
525525
failWholeBatch = true;

powertools-sqs/src/main/java/software/amazon/lambda/powertools/sqs/exception/SkippedMessageDueToFailedBatchException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package software.amazon.lambda.powertools.sqs.exception;
22

33
/**
4-
* Thrown to indicate that a
4+
* Indicates that a message has been skipped due to the batch it is
5+
* within failing.
56
*/
67
public class SkippedMessageDueToFailedBatchException extends Exception {
78

0 commit comments

Comments
 (0)