Let's say I have following DynamoDB table with entries:
A B C // column
a1 b1 c1 // entry 1
a1 b2 c2 // entry 2
A is the key (partition key), B is the sort key (unique), C is an attribute.
I'd like to make sure the DynamoDB streams can guarantee in-ordering processing for B.
If changes made in this order - (note C updated 3 times)
{a1, b1, c1} => {a1, b1, c2} => {a1, b1, c3}
Can DynamoDB Stream guarantee the ordering? Looks like in-order processing for updates on the same key is guaranteed. For this example, so the order of any update on a1 (key) will be preserved?
Yes, the ordering is preserved because in DynamoDB all changes to items are made using the item key (whether partition-only, or composite) and DynamoDB Streams guarantee exactly once, in-order delivery of all mutations to each item.
From the docs:
Each stream record appears exactly once in the stream.
For each item that is modified in a DynamoDB table, the stream records appear in the same sequence as the actual modifications to the item.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With