DynamoDB Streams - Are shards ordered in the stream description?

0

I’m aware that the items in the stream are ordered. My principle question then is about whether or not the shards are ordered in the stream description. If they are, I can always just grab the latest shard and process records from there; if not, I would need to keep track of the shards already processed in order to get only the new shard from the next iteration when I grab the stream description—I.e., after the current shard is closed and I have to quit out of the getRecords loop for that shard.

Further Context:
I have already complete a KCL implementation, but am looking at doing a lower-level implementation, as that looks to be more suited to our particular needs. Ultimately, I just need to get the latest record from the table (broadcast amongst all of the service nodes). That said, my quick question is as follows: is the shard list returned from DescribeStreamResult.getShards() an ordered list? (I presume this follows the general describe stream API, but have yet to see anything indicating whether or not this list is ordered.)

質問済み 8年前592ビュー
1回答
0
承認された回答

The DynamoDB streams api is "intentionally" similar to Kinesis streams (from the documentation here). This also states that: Using the Kinesis Adapter is the recommended way to consume Streams from DynamoDB. The API documentation for the Kinesis DescribeStream API states that:

There are no guarantees about the chronological order shards returned in DescribeStream results. If you want to process shards in chronological order, use ParentShardId to track lineage to the oldest shard.

The DynamoDB DescribeStream API contains the parentSharedId as well as SequenceNumberRange.

回答済み 8年前
profile picture
エキスパート
レビュー済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ