Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.1] - 2026-02-11

### Fixed

- Integer overflow in MaxRecords int to int32 conversion (polling-shard-consumer.go)

## [0.2.0] - 2026-02-11

### Added
Expand Down
3 changes: 3 additions & 0 deletions clientlibrary/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ const (
// DefaultMaxRecords Max records to fetch from Kinesis in a single GetRecords call.
DefaultMaxRecords = 10000

// MaxMaxRecords Upper bound for MaxRecords (Kinesis GetRecords API limit).
MaxMaxRecords = 10000

// DefaultIdleTimeBetweenReadsMillis The default value for how long the {@link ShardConsumer}
// should sleep if no records are returned from the call to
DefaultIdleTimeBetweenReadsMillis = 1000
Expand Down
3 changes: 3 additions & 0 deletions clientlibrary/config/kcl-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ func (c *KinesisClientLibConfiguration) WithShardSyncIntervalMillis(shardSyncInt

func (c *KinesisClientLibConfiguration) WithMaxRecords(maxRecords int) *KinesisClientLibConfiguration {
checkIsValuePositive("MaxRecords", maxRecords)
if maxRecords > MaxMaxRecords {
log.Panicf("MaxRecords must not exceed %d (Kinesis API limit), got: %d", MaxMaxRecords, maxRecords)
}
c.MaxRecords = maxRecords
return c
}
Expand Down