exam questions

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

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

Exam AWS Certified Solutions Architect - Associate SAA-C02 topic 1 question 350 discussion

A solutions architect is redesigning a monolithic application to be a loosely coupled application composed of two microservices: Microservice A and Microservice
B.
Microservice A places messages in a main Amazon Simple Queue Service (Amazon SQS) queue for Microservice B to consume. When Microservice B fails to process a message after four retries, the message needs to be removed from the queue and stored for further investigation.
What should the solutions architect do to meet these requirements?

  • A. Create an SQS dead-letter queue. Microservice B adds failed messages to that queue after it receives and fails to process the message four times.
  • B. Create an SQS dead-letter queue. Configure the main SQS queue to deliver messages to the dead-letter queue after the message has been received four times.
  • C. Create an SQS queue for failed messages. Microservice A adds failed messages to that queue after Microservice B receives and fails to process the message four times.
  • D. Create an SQS queue for failed messages. Configure the SQS queue for failed messages to pull messages from the main SQS queue after the original message has been received four times.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
93madox
Highly Voted 3 years, 7 months ago
B https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html When you attach DL-queue you can specify the retry.
upvoted 39 times
lollo1234
3 years, 6 months ago
Can the microservice b add the message to the DLQ? I think the SQS queue can do it
upvoted 1 times
gargaditya
3 years, 6 months ago
This is the crux, its to be done by the main SQS queue, not by the microservice.
upvoted 2 times
...
...
grinha
3 years, 5 months ago
I have a question, SQS is pull queue, how can it "deliver messages"?
upvoted 1 times
...
noahsark
3 years, 7 months ago
I think it might be B too -> On your AWS Free Trial Account, go to SQS -> Queues -> Create queue -> Dead-letter queue -> Enabled -> then input Maximum receives (Should be between 1 and 1000).
upvoted 6 times
...
...
lovelyone
Highly Voted 3 years, 7 months ago
Answer is A What are the benefits of dead-letter queues? The main task of a dead-letter queue is handling message failure. A dead-letter queue lets you set aside and isolate messages that can’t be processed correctly to determine why their processing didn’t succeed. Setting up a dead-letter queue allows you to do the following: Configure an alarm for any messages delivered to a dead-letter queue. Examine logs for exceptions that might have caused messages to be delivered to a dead-letter queue. Analyze the contents of messages delivered to a dead-letter queue to diagnose software or the producer’s or consumer’s hardware issues. Determine whether you have given your consumer sufficient time to process messages. thus the main issue of this technology is to put the failed message on the dead letter queue Answer B cant be an option because the main SQS never send deliver a message to the dead letter if the message has been recived.
upvoted 18 times
patriktre
3 years, 6 months ago
not right. SQS moves message to DLQ not a consumer (microservice B here). B is correct.
upvoted 5 times
...
Julz91
3 years, 6 months ago
that`s not right.Just after receiving SQS Queue for X-times the messages can be forwarded to the Dead Letter Que, but not for the SQS Queue consumer itself
upvoted 3 times
...
...
BECAUSE
Most Recent 1 year, 11 months ago
Selected Answer: B
B is the answer
upvoted 1 times
...
natnette
2 years, 10 months ago
I would go for B (No mention of Lambda in this case so SQS service will send msg to DLQ) I think the confusion is around the use of microservices and the fact that Lambda can send unprocessed messages to a DLQ using Lambda retries
upvoted 1 times
natnette
2 years, 10 months ago
if coming from SNS to Lambda though
upvoted 1 times
...
...
daddycool
3 years, 4 months ago
This is tough, but if you study - https://aws.amazon.com/blogs/compute/using-amazon-sqs-dead-letter-queues-to-replay-messages/ You will see that the process flow is discussed. The flow of the message sent by the producer to SQS is as follows: The producer application sends a message to an SQS queue The consumer application fails to process the message in the same SQS queue The message is moved from the main SQS queue to the default dead-letter queue as per the component settings. A Lambda function is configured with the SQS main dead-letter queue as an event source. It receives and sends back the message to the original queue adding a message timer. The message timer is defined by the exponential backoff and jitter algorithm. You can limit the number of retries. If the message exceeds this limit, the message is moved to a second DLQ where an operator processes it manually. So the answer is B
upvoted 5 times
...
Sant25
3 years, 5 months ago
Ans-B https://aws.amazon.com/blogs/compute/using-amazon-sqs-dead-letter-queues-to-replay-messages/
upvoted 1 times
...
Microgen
3 years, 5 months ago
sqs cannot delivery messages to multiple locations. answer is A
upvoted 1 times
...
aws_aspirant
3 years, 5 months ago
Selected Answer: B
BBBBBBBBBB
upvoted 1 times
...
RiTh73
3 years, 6 months ago
Answer is B The redrive policy specifies the source queue, the dead-letter queue, and the conditions under which Amazon SQS moves messages from the former to the latter if the consumer of the source queue fails to process a message a specified number of times. When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves the message to a dead-letter queue (with its original message ID). For example, if the source queue has a redrive policy with maxReceiveCount set to 5, and the consumer of the source queue receives a message 6 times without ever deleting it, Amazon SQS moves the message to the dead-letter queue. https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
upvoted 5 times
...
vaaws
3 years, 6 months ago
Ans A Failed to process 4 times The redrive policy specifies the source queue, the dead-letter queue, and the conditions under which Amazon SQS moves messages from the former to the latter if the consumer of the source queue fails to process a message a specified number of times. When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves the message to a dead-letter queue (with its original message ID). For example, if the source queue has a redrive policy with maxReceiveCount set to 5, and the consumer of the source queue receives a message 6 times without ever deleting it, Amazon SQS moves the message to the dead-letter queue. Not B because it says message moves to DLQ if it receives 4 times, but the max count in question is 4 times not 3 times
upvoted 2 times
swadeey
3 years, 6 months ago
You say "A" and as per a point in your explanation: " Amazon SQS moves the message to a dead-letter queue (with its original message ID)." As per A "Microservice B adds failed messages to that queue after it receives and fails to process the message four times" So you say SQS moves data and option A says Microservice B adds failed messages. Your explanation is not matching to your answer.
upvoted 2 times
...
...
reliquary
3 years, 6 months ago
came up in my exam yesterday picked B
upvoted 10 times
...
ExamExpert82
3 years, 6 months ago
B --> https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-dead-letter-queue.html
upvoted 5 times
...
MuleMax
3 years, 6 months ago
B is correct. Both A & B aren't conceptually wrong but B is the way SQS handles failed queues. See an excerpt from Amazon's documentation: "...ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves the message to a dead-letter queue (with its original message ID). For example, if the source queue has a redrive policy with maxReceiveCount set to 5, and the consumer of the source queue receives a message 6 times without ever deleting it, Amazon SQS moves the message to the dead-letter queue..."
upvoted 7 times
...
jkwek
3 years, 6 months ago
Answer is A. I have been supporting MQ series for 10 over years. Usually when a queue failed to be processed, it will be dumped to the dead letter queue. B is not possible because there are no failed messages. C and D are not possible because there is no dead letter queue for failed messages.
upvoted 3 times
Ekay
3 years, 6 months ago
answer is B A dead-letter queue is a queue that one or more source queues can use for messages that are not consumed successfully. Note the use of "source queue"
upvoted 2 times
...
Gomer
3 years, 5 months ago
I think the answer is C. I think they are trying to be tricky, because the "failed messages" Queue is actually a dead-letter queue. I used to support IBM MQ Series as well, though I'm no expert. To me, answer C is only only one with coherent logic, other than I think they are trying to throw you buy being ambiguous with what they are calling the queue. I'm going with C because the other answers are flawed (even B).
upvoted 1 times
...
...
KK_uniq
3 years, 6 months ago
I will go with B.
upvoted 1 times
...
EarlBrillantes061816
3 years, 6 months ago
Microservices can try to process the events internally for four times then send it to DLQ. For B we need atleast 2 DLQ if we want to reprocess the event using the main SQS. answer would be A
upvoted 3 times
...
Abdullah22
3 years, 7 months ago
"The redrive policy specifies the source queue, the dead-letter queue, and the conditions under which Amazon SQS moves messages from the former to the latter if the consumer of the source queue fails to process a message a specified number of times." the q who make the transfer not the microservice .BB
upvoted 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago