DVA-C02 · Question #584
A company has developed an application that uses AWS Lambda functions to process messages from an Amazon SQS queue. One of the Lambda functions makes a call to an external API that is expected to…
The correct answer is B. Set the visibility timeout parameter at the queue level. Configure the Lambda function to delete. Setting the visibility timeout ensures that once a message is being processed, it is temporarily hidden from other consumers. The Lambda function must delete processed messages to avoid re-processing when the visibility timeout expires.
Question
A company has developed an application that uses AWS Lambda functions to process messages from an Amazon SQS queue. One of the Lambda functions makes a call to an external API that is expected to encounter temporary service unavailability. A developer needs to configure the function to retry failed messages from an Amazon SQS dead- letter queue. The developer notices that the Lambda function is re-processing some messages in the queue more than once. Which solution will resolve this issue?
Options
- ASet a message retention period for each message. Configure the Lambda function to add a
- BSet the visibility timeout parameter at the queue level. Configure the Lambda function to delete
- CSet a receive message wait time for each message. Configure the Lambda function to add a
- DSet the delivery delay parameter at the queue level. Configure the Lambda function to delete
How the community answered
(27 responses)- A4% (1)
- B74% (20)
- C15% (4)
- D7% (2)
Explanation
Setting the visibility timeout ensures that once a message is being processed, it is temporarily hidden from other consumers. The Lambda function must delete processed messages to avoid re-processing when the visibility timeout expires.
Community Discussion
No community discussion yet for this question.