From 2aa48dd3e03cf939902cd671836fe5334e5c08cb Mon Sep 17 00:00:00 2001 From: Oguzhan Unlu Date: Thu, 10 Oct 2024 13:48:03 +0300 Subject: [PATCH] [to be removed] test --- shard_consumer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shard_consumer.go b/shard_consumer.go index 9ace745..a55aa2a 100644 --- a/shard_consumer.go +++ b/shard_consumer.go @@ -62,6 +62,12 @@ func getRecords(k kinesisiface.KinesisAPI, streamName string, shardID string, it ShardIterator: aws.String(iterator), } + // sleep for 5 minutes + 5 sec, to make sure the shard iterator expires + fmt.Println("Sleeping for 305 seconds") + fmt.Printf("pre-sleep time.Now: %s\n", time.Now().Format(time.RFC3339)) + time.Sleep(305 * time.Second) + fmt.Printf("post-sleep time.Now: %s\n", time.Now().Format(time.RFC3339)) + output, err := k.GetRecords(params) if err != nil {