An application takes 40 seconds to process instructions received in an Amazon SQS message.
Assuming the SQS queue is configured with the default VisibilityTimeout value, what is the BEST way, upon receiving a message, to ensure that no other instances can retrieve a message that has already been processed or is currently being processed?
A . Use the ChangeMessageVisibility API to increase the VisibilityTimeout, then use the DeleteMessage API to delete the message.
B . Use the DeleteMessage API call to delete the message from the queue, then call DeleteQueue API to remove the queue.
C . Use the ChangeMessageVisibility API to decrease the timeout value, then use the DeleteMessage API to delete the message.
D . Use the DeleteMessageVisibility API to cancel the VisibilityTimeout, then use the DeleteMessage API to delete the message.
Answer: A
Leave a Reply