nerdexam
Amazon

DAS-C01 · Question #95

An online retailer is rebuilding its inventory management system and inventory reordering system to automatically reorder products by using Amazon Kinesis Data Streams. The inventory management…

The correct answer is A. The producer has a network-related timeout. C. There was a change in the number of shards, record processors, or both. Two well-known sources of KPL/KCL duplicates: (A) When the KPL sends a record and does not receive an acknowledgment due to a network timeout, it automatically retries the PUT, resulting in the same record appearing in the stream more than once. KCL consumers must implement…

Processing

Question

An online retailer is rebuilding its inventory management system and inventory reordering system to automatically reorder products by using Amazon Kinesis Data Streams. The inventory management system uses the Kinesis Producer Library (KPL) to publish data to a stream. The inventory reordering system uses the Kinesis Client Library (KCL) to consume data from the stream. The stream has been configured to scale as needed. Just before production deployment, the retailer discovers that the inventory reordering system is receiving duplicated data. Which factors could be causing the duplicated data? (Choose two.)

Options

  • AThe producer has a network-related timeout.
  • BThe stream's value for the IteratorAgeMilliseconds metric is too high.
  • CThere was a change in the number of shards, record processors, or both.
  • DThe AggregationEnabled configuration property was set to true.
  • EThe max_records configuration property was set to a number that is too high.

How the community answered

(18 responses)
  • A
    78% (14)
  • B
    6% (1)
  • D
    11% (2)
  • E
    6% (1)

Explanation

Two well-known sources of KPL/KCL duplicates: (A) When the KPL sends a record and does not receive an acknowledgment due to a network timeout, it automatically retries the PUT, resulting in the same record appearing in the stream more than once. KCL consumers must implement idempotent processing to handle this. (C) When the number of shards changes (resharding) or the number of KCL record processors changes, KCL redistributes shard ownership among workers. During this rebalancing, some records near the checkpoint boundary may be reprocessed by the new owner of a shard. IteratorAgeMilliseconds (option B) reflects consumer lag, not duplication. AggregationEnabled (option D) batches records for efficiency but does not cause duplicates. max_records (option E) controls how many records a GetRecords call returns and does not cause duplication.

Topics

#Kinesis Data Streams#Kinesis Producer Library (KPL)#Kinesis Client Library (KCL)#At-least-once delivery

Community Discussion

No community discussion yet for this question.

Full DAS-C01 Practice