I am running localstack on docker-desktop to simulate and read records from Dynamostreams. However, I notice that the clock is not strictly moving forward between two GetRecords calls. To demonstrate this, I hacked both localstack and kinesalite locally to print out more information. Here is what I have found:
This is the response of GetRecords from nth request to kinesis.
Notice the message (I added locally :p) now is 1612305062032 iteratorTime is 1612305062033 reveals that the request failed at this check.
It seems that the clock is not synced between two getRecords calls and I suggest adding 100 milliseconds margin to account for that (value of margin is open for discussion).
Let me know if there is a better solution, thanks in advance! :)
I am running localstack on docker-desktop to simulate and read records from Dynamostreams. However, I notice that the clock is not strictly moving forward between two GetRecords calls. To demonstrate this, I hacked both localstack and kinesalite locally to print out more information. Here is what I have found:
This is the response of GetRecords from nth request to kinesis.
We use the
NextShardIterator
from the above response in (n+1)th request to get next batch of records, but get followingInvalidArgumentException
.However, retrying (n+1)th request succeeded without any issue.
Notice the message (I added locally :p)
now is 1612305062032 iteratorTime is 1612305062033
reveals that the request failed at this check. It seems that the clock is not synced between two getRecords calls and I suggest adding 100 milliseconds margin to account for that (value of margin is open for discussion).Let me know if there is a better solution, thanks in advance! :)