We could look into using response.lastEvaluatedKey and use that as exclusiveStartKey in query, instead of the timestamp for subsequent queries. Not sure how that works with GSI where the sort key isn't unique (same timestamp). If DynamoDB can keep track of the exact offset and not emit duplicates would not need the seen Map and that filter. Well, we still need it for the first query because we want the external offset to be TimestampOffset and that can include seen Map.
There is a corresponding FIXME for this.
We could look into using response.lastEvaluatedKey and use that as exclusiveStartKey in query, instead of the timestamp for subsequent queries. Not sure how that works with GSI where the sort key isn't unique (same timestamp). If DynamoDB can keep track of the exact offset and not emit duplicates would not need the seen Map and that filter. Well, we still need it for the first query because we want the external offset to be TimestampOffset and that can include seen Map.
There is a corresponding FIXME for this.