I can't find in the formal documentation of AWS Kinesis
any explicit reference between TRIM_HORIZON
and the checkpoint, and also any reference between LATEST
and the checkpoint.
Can you confirm my theory:
TRIM_HORIZON
- In case the application-name is new, then I will read all the records available in the stream. Else, application-name was already used, then I will read from my last checkpoint.LATEST
- In case the application-name is new, then I will read all the records in the stream which added after I subscribed to the stream. Else, application-name was already used, I will read messages from my last checkpoint.The difference between
TRIM_HORIZON
andLATEST
is only in case the application-name is new.
From GetShardIterator documentation (which lines up with my experience using Kinesis):
Basically, the difference is whether you want to start from the oldest unprocessed record (
TRIM_HORIZON
), or from "right now" (LATEST
- skipping data between latest checkpoint and now).