A company is designing a web-based educational testing platform. When a student submits an exam, the platform must process the submission asynchronously to calculate the score, generate a PDF certificate, and send an email notification. The grading service must process the answers in the exact order they were submitted by the student to prevent concurrency issues, and multiple backend microservices must receive the submission events independently. Which solution meets these requirements with the least operational overhead?
- APublish the exam submission events to an Amazon SNS standard topic. Subscribe separate Amazon SQS standard queues for the grading, certificate, and notification services to the SNS standard topic.
- BPublish the exam submission events to an Amazon SNS standard topic. Subscribe separate Amazon SQS FIFO queues for the grading, certificate, and notification services to the SNS standard topic.
- Publish the exam submission events to an Amazon SNS FIFO topic. Subscribe separate Amazon SQS FIFO queues for the grading, certificate, and notification services to the SNS FIFO topic.Cevap
- DPublish the exam submission events to a single Amazon SQS standard queue, and configure the consumer services to poll the queue and filter for their respective message types.
Cevap
Publish the exam submission events to an Amazon SNS FIFO topic. Subscribe separate Amazon SQS FIFO queues for the grading, certificate, and notification services to the SNS FIFO topic.
The correct solution uses an Amazon SNS FIFO topic subscribed to by multiple Amazon SQS FIFO queues. An SNS FIFO topic ensures that message ordering is preserved during fan-out, and SQS FIFO queues guarantee that the consumer microservices process the messages in the exact order they were published. This satisfies both the decoupling/fan-out requirement and the strict message ordering constraint with minimal operational overhead.
Adım Adım Çözüm
Anahtar Kavram
Decoupling event-driven architectures with ordering guarantees using SNS FIFO and SQS FIFO fan-out pattern.
Tahmini Süre:1m 30s