What should the solutions architect do to meet these requirements?
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.
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.
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.
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.
Explanations:
This option suggests that Microservice B adds failed messages to a separate SQS queue after failing to process a message four times. However, this approach does not leverage SQS’s built-in dead-letter queue functionality, which automatically handles message failures after the specified number of retries.
This option correctly proposes creating an SQS dead-letter queue and configuring the main SQS queue to deliver messages to the dead-letter queue after they have been received and failed processing four times. This is the intended use of dead-letter queues in SQS, allowing for failed message storage for further investigation.
This option suggests that Microservice A manages the failed messages by adding them to a separate queue after Microservice B fails to process them four times. This approach requires additional logic in Microservice A and does not utilize the SQS dead-letter queue mechanism, which is specifically designed to handle this scenario.
This option involves creating a separate SQS queue for failed messages that pulls from the main queue after four processing failures. This setup complicates the architecture unnecessarily and does not use the built-in dead-letter queue feature of SQS, which is the more appropriate solution for handling message processing failures.