You are building an online store on AWS that uses SQS to process your customer orders. Your backend system needs those messages in the same sequence the customer orders have been put in. How can you achieve that?
A.
It is not possible to do this with SQS
B.
You can use sequencing information on each message
C.
You can do this with SQS but you also need to use SWF
D.
Messages will arrive in the same order by default
Suggested Answer:B🗳️
Amazon SQS is engineered to always be available and deliver messages. One of the resulting tradeoffs is that SQSdoes not guarantee first in, first out delivery of messages. For many distributed applications, each message can stand on its own, and as long as all messages are delivered, the order is not important. If your system requires that order be preserved, you can place sequencing information in each message, so that you can reorder the messages when the queue returns them.
SQS supports FIFO queue. https://aws.amazon.com/sqs/features/
Just that, other options are incorrect. (B) is the best answer. Especially (C), you don't need SWF to do this.
B
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/stand
ard-queues.html
A standard queue makes a best effort to preserve the order of messages, but more than one copy of a message might be delivered out of order. If your system requires that order be preserved, we recommend using a FIFO (First-In-First-Out) queue or adding sequencing information in each message so you can reorder the messages when they're received.
A standard queue makes a best effort to preserve the order of messages, but more than one copy of a message might be delivered out of order. If your system requires that order be preserved, we recommend using a FIFO (First-In-First-Out) queue or adding sequencing information in each message so you can reorder the messages when they're received.
The tricky part of the question is "messages in the same sequence". Usually we think Delivery which means FIFO & Standard Method to deliver exactly once or at least once. But the requirement is sequence..
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.
hou0220
6 months agoAMohanty
6 months, 2 weeks agoTroyMcLure
6 months, 3 weeks agoNoCrapEva
6 months, 3 weeks agoamrtandre
7 months agoawscertified
7 months, 1 week agoChirantan
7 months, 2 weeks agokarmaah
7 months, 2 weeks agokarmaah
7 months, 2 weeks ago