From c2ceb5523a51be631f2850e4b154254a4c17693d Mon Sep 17 00:00:00 2001 From: Nicholas Griffin Date: Wed, 15 Feb 2023 21:28:17 +0000 Subject: [PATCH] chore: updating advice on message processing (#366) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2a299da7..94c15dea 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ app.start(); - Messages are deleted from the queue once the handler function has completed successfully. - Throwing an error (or returning a rejected promise) from the handler function will cause the message to be left on the queue. An [SQS redrive policy](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html) can be used to move messages that cannot be processed to a dead letter queue. - By default messages are processed one at a time – a new message won't be received until the first one has been processed. To process messages in parallel, use the `batchSize` option [detailed below](#options). +- By default, messages that are sent to the `handleMessage` and `handleMessageBatch` functions will be considered as processed if they return without an error. To acknowledge individual messages, please return the message that you want to acknowledge if you are using `handleMessage` or the messages for `handleMessageBatch`. It's also important to await any processing that you are doing to ensure that messages are processed one at a time. ### Credentials