A company is developing a ticket booking application on AWS. When a customer purchases a ticket, the system must process the payment transaction and assign a seat. To avoid double-booking and payment discrepancies, the transaction messages must be processed in the exact order they are received. The company wants to decouple the front-end application from the back-end processing service.
Which solution meets these requirements with the least operational overhead?
- ASend the transaction messages to a standard Amazon SQS queue, and configure the back-end service to consume the messages.
- BStore the transaction messages in an Amazon DynamoDB table configured with provisioned capacity mode, and have the back-end service poll the table.
- Send the transaction messages to an Amazon SQS FIFO queue, and configure the back-end service to consume the messages.Cevap
- DStream the transaction messages to an Amazon Kinesis data stream configured with a single provisioned shard, and configure the back-end service to process the stream.
Cevap
Send the transaction messages to an Amazon SQS FIFO queue, and configure the back-end service to consume the messages.
The correct answer is to use an Amazon SQS FIFO queue. FIFO (First-In-First-Out) queues guarantee that messages are processed in the exact order in which they are sent. This native capability meets the ordering requirement with zero additional application logic and minimal operational overhead, while successfully decoupling the front-end and back-end services.
Adım Adım Çözüm
Anahtar Kavram
Using Amazon SQS FIFO queues to decouple components while ensuring strict first-in, first-out message ordering.