A company has run a major auction platform where people buy and sell a wide range of products.
The platform requires that transactions from buyers and sellers get processed in exactly the order received.
At the moment, the platform is implemented using RabbitMQ which is a light-weighted queue system.
The company consulted you to migrate the on-premise platform to AWS.
How should you design the migration plan? (Select TWO)
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer - A, C.
SQS has 2 types - standard queue and FIFO queue.
In this case, the FIFO queue should be chosen as the order of message processing is critical to the application.
FIFO queue has the below key features.
Option A is CORRECT: Because the SQS FIFO queue can help with the message processing in the right order.
Option B is incorrect: Because the SQS standard queue may have an issue that some messages are handled in the wrong sequence.
Option C is CORRECT: Because the message group ID is a feature to help with the FIFO delivery.
Messages that belong to the same message group are always processed one by one, in a strict order relative to the message group.
Option D is incorrect: Because deduplication ID is a method to help on preventing messages to be processed duplicately, which is not used to guarantee the message order.
The key requirement for this migration is to ensure that transactions are processed in the order received. Since the current system is using RabbitMQ, a lightweight queue system, one way to maintain the same order is to migrate to an AWS queue service that supports ordering of messages.
Option A and B both suggest using Amazon Simple Queue Service (SQS) as the queue system for the migrated platform. However, they differ in the type of SQS queue to be used.
Option A suggests using an SQS FIFO (First-In-First-Out) queue, which is designed to maintain strict message order. This is an appropriate solution for the use case, as it ensures that the transactions are processed in the exact order received. Additionally, SQS FIFO queues guarantee that messages are delivered exactly once, which is important in the context of processing transactions.
Option B suggests using an SQS standard queue, which is a highly scalable and reliable queue service. However, unlike SQS FIFO queues, the standard queue does not guarantee message ordering. While it's possible to ensure some degree of ordering by using message group IDs, it is not guaranteed to maintain the exact order of transactions received.
Option C suggests using message group IDs to ensure message processing in strict order, but this is only relevant when using an SQS standard queue, as FIFO queues maintain strict order by design.
Option D suggests using an EC2 or Lambda function to add a deduplication ID to messages before they are sent to the SQS queue. This ensures that only unique messages are processed, avoiding duplication. However, it does not address the requirement for strict message order.
In summary, options A and C are the correct choices for designing the migration plan. Specifically, the platform should use an SQS FIFO queue to maintain strict message order, and message group IDs can be added to ensure that messages within a group are processed in the correct order.