Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified Solutions Architect - Associate SAA-C03 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Associate SAA-C03 exam

Exam AWS Certified Solutions Architect - Associate SAA-C03 topic 1 question 67 discussion

A company hosts an application on multiple Amazon EC2 instances. The application processes messages from an Amazon SQS queue, writes to an Amazon RDS table, and deletes the message from the queue. Occasional duplicate records are found in the RDS table. The SQS queue does not contain any duplicate messages.
What should a solutions architect do to ensure messages are being processed once only?

  • A. Use the CreateQueue API call to create a new queue.
  • B. Use the AddPermission API call to add appropriate permissions.
  • C. Use the ReceiveMessage API call to set an appropriate wait time.
  • D. Use the ChangeMessageVisibility API call to increase the visibility timeout.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
KVK16
Highly Voted 2 years, 1 month ago
Selected Answer: D
In case of SQS - multi-consumers if one consumer has already picked the message and is processing, in meantime other consumer can pick it up and process the message there by two copies are added at the end. To avoid this the message is made invisible from the time its picked and deleted after processing. This visibility timeout is increased according to max time taken to process the message
upvoted 52 times
JayBee65
1 year, 11 months ago
To add to this "The VisibilityTimeout in SQS is a time frame that the message can be hidden so that no others can consume it except the first consumer who calls the ReceiveMessageAPI." The API ChangeMesssageVisibility changes this value.
upvoted 19 times
...
...
Buruguduystunstugudunstuy
Highly Voted 1 year, 11 months ago
Selected Answer: D
To ensure that messages are being processed only once, a solutions architect should use the ChangeMessageVisibility API call to increase the visibility timeout which is Option D. The visibility timeout determines the amount of time that a message received from an SQS queue is hidden from other consumers while the message is being processed. If the processing of a message takes longer than the visibility timeout, the message will become visible to other consumers and may be processed again. By increasing the visibility timeout, the solutions architect can ensure that the message is not made visible to other consumers until the processing is complete and the message can be safely deleted from the queue. Option A (Use the CreateQueue API call to create a new queue) would not address the issue of duplicate message processing. Option B (Use the AddPermission API call to add appropriate permissions) is not relevant to this issue. Option C (Use the ReceiveMessage API call to set an appropriate wait time) is also not relevant to this issue.
upvoted 15 times
karbob
1 year, 10 months ago
not relevant to this issue. ??? what is added value
upvoted 3 times
Buruguduystunstugudunstuy
1 year, 8 months ago
Option B (Use the AddPermission API call to add appropriate permissions) is not relevant to this issue because it deals with setting permissions for accessing an SQS queue, which is not related to preventing duplicate records in the RDS table. Option C (Use the ReceiveMessage API call to set an appropriate wait time) is not relevant to this issue because it is related to configuring how long the ReceiveMessage API call should wait for new messages to arrive in the SQS queue before returning an empty response. It does not address the issue of duplicate records in the RDS table.
upvoted 7 times
...
...
...
PaulGa
Most Recent 2 months, 1 week ago
Selected Answer: D
Ans D - once the message is selected in the queue 'hide' it from other users/apps so it is only processed once, using API 'ChangeMesssageVisibility'
upvoted 2 times
...
awsgeek75
10 months, 1 week ago
Selected Answer: D
AB: Irrelevant C: This is for long polling not for execution https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html#sqs-long-polling D: Visibility is correct fix issue because over here other SQS clients are seeing the same message back in the que when the previous processor is taking longer than expected to process the message
upvoted 1 times
...
Subhrangsu
1 year, 1 month ago
I also opt for D, but asking does increasing MessageVisibilityTimeOut good always?
upvoted 2 times
awsgeek75
10 months, 1 week ago
This parameter is the timeout after which the SQS assumes that the processing has failed and makes the item visible to other que processors. It is normal to increase the timeout if it takes longer to process items.
upvoted 1 times
...
...
miki111
1 year, 4 months ago
Option D is the right answer.
upvoted 1 times
...
cookieMr
1 year, 5 months ago
Selected Answer: D
The visibility timeout is the duration during which SQS prevents other consumers from receiving and processing the same message. By increasing the visibility timeout, you allow more time for the processing of a message to complete before it becomes visible to other consumers. Option A, creating a new queue, does not address the issue of concurrent processing and duplicate records. It would only create a new queue, which is not necessary for solving the problem. Option B, adding permissions, also does not directly address the issue of duplicate records. Permissions are necessary for accessing the SQS queue but not for preventing concurrent processing. Option C, setting an appropriate wait time using the ReceiveMessage API call, does not specifically prevent duplicate records. It can help manage the rate at which messages are received from the queue but does not address the issue of concurrent processing.
upvoted 4 times
...
cheese929
1 year, 7 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
alexiscloud
1 year, 7 months ago
Answer D: visibility timeout beings when amazon SQS return a message
upvoted 1 times
...
test_devops_aws
1 year, 8 months ago
Selected Answer: D
D = ChangeMessageVisibility
upvoted 1 times
...
dev1978
1 year, 10 months ago
In theory, between reception and changing visibility, you can have multiple consumers. Question is not good as it won't guarantee not executing twice.
upvoted 1 times
...
techhb
1 year, 10 months ago
Selected Answer: D
Increaseing visibility timeout makes sure message is not visible for time taken to process the message.
upvoted 1 times
...
career360guru
1 year, 11 months ago
Selected Answer: D
Option D
upvoted 1 times
...
Wpcorgan
2 years ago
D is correct
upvoted 1 times
...
mabotega
2 years ago
Selected Answer: D
D is the correct choise, increasing the visibility timeout according to max time taken to process the message on the RDS.
upvoted 1 times
...
Valero_
2 years, 1 month ago
Selected Answer: D
True, it's D. https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...