Skip to content

fix: recover from ExpiredIteratorException by renewing shard iterator from checkpoint#7

Merged
ODudek merged 1 commit into
mainfrom
fix/expired-iterator-recovery
Mar 26, 2026
Merged

fix: recover from ExpiredIteratorException by renewing shard iterator from checkpoint#7
ODudek merged 1 commit into
mainfrom
fix/expired-iterator-recovery

Conversation

@ODudek

@ODudek ODudek commented Mar 26, 2026

Copy link
Copy Markdown
Owner

When ProcessRecords takes longer than the 5-minute Kinesis iterator TTL, GetRecords returns ExpiredIteratorException. Previously this was treated as a non-retryable error, terminating the shard consumer permanently.

Now the consumer renews the iterator from the last checkpoint and continues processing, preventing permanent shard stalls during high-latency batches.

… from checkpoint

When ProcessRecords takes longer than the 5-minute Kinesis iterator TTL,
GetRecords returns ExpiredIteratorException. Previously this was treated as
a non-retryable error, terminating the shard consumer permanently.

Now the consumer renews the iterator from the last checkpoint and continues
processing, preventing permanent shard stalls during high-latency batches.
@ODudek ODudek merged commit 4e8305a into main Mar 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant