TRIM_HORIZON vs LATEST

后端 未结 2 1465
你的背包
你的背包 2020-12-29 21:36

I can\'t find in the formal documentation of AWS Kinesis any explicit reference between TRIM_HORIZON and the checkpoint, and also

相关标签:
2条回答
  • 2020-12-29 22:05

    AT_TIMESTAMP

    -- from specific time stamp

    TRIM_HORIZON

    -- all the available messages in Kinesis stream from the beginning (same as earliest in Kafka)

    LATEST

    -- from the latest messages , i.e current message that just came into Kinesis/Kafka and all the incoming messages from that time onwords

    0 讨论(0)
  • 2020-12-29 22:23

    From GetShardIterator documentation (which lines up with my experience using Kinesis):

    In the request, you can specify the shard iterator type AT_TIMESTAMP to read records from an arbitrary point in time, TRIM_HORIZON to cause ShardIterator to point to the last untrimmed record in the shard in the system (the oldest data record in the shard), or LATEST so that you always read the most recent data in the shard.

    Basically, the difference is whether you want to start from the oldest record (TRIM_HORIZON), or from "right now" (LATEST - skipping data between latest checkpoint and now).

    0 讨论(0)
提交回复
热议问题