DEA-C01 Question 286
Single answerYour organization processes financial transaction data using an Amazon Kinesis Data Stream. You notice that some records are being processed out of order due to the high volume of incoming data. To address this issue, you are tasked with ensuring that records are processed in the correct order while maintaining real-time data processing. Which approach will best resolve the problem?
- A
Increase the number of shards in the Kinesis Data Stream to handle higher throughput.
- B
Use partition keys to group related records for ordering guarantees within a shard.
- C
Implement AWS Lambda to process the records and enforce ordering through custom logic.
- D
Enable enhanced fan-out in the Kinesis Data Stream to reduce consumer latency.
Show answer and explanation
Correct answer: B
Explanation
Kinesis Data Streams guarantee ordering of data within a shard. By using partition keys, you can ensure related records are sent to the same shard, preserving their order. This approach is simpler and more efficient than implementing custom logic for ordering, and it directly addresses the issue of records being processed out of order.
- A. Incorrect.
Increasing the number of shards improves throughput but does not guarantee ordered processing of records within a shard.
- B. Correct.
Using partition keys ensures that related records are routed to the same shard, allowing ordering guarantees within that shard.
- C. Incorrect.
While AWS Lambda can process records, it does not inherently enforce ordering unless additional complex logic is implemented, which is unnecessary when partition keys can solve the problem natively.
- D. Incorrect.
Enhanced fan-out reduces consumer latency in high-throughput scenarios but does not address ordering issues.