davsclaus opened a new pull request, #24878:
URL: https://github.com/apache/camel/pull/24878

   _Claude Code on behalf of davsclaus_
   
   ## Summary
   
   Fixes two medium-severity findings in the Kinesis component:
   
   **1. Fixed-shardId consumer called DescribeStream on every poll**
   - Replaced per-poll `DescribeStream` API call with a lookup against the 
cached shard list from `ShardMonitor`
   - `ShardMonitor` uses `ListShards` (paginated, 100 TPS limit) vs 
`DescribeStream` (unpaginated, 10 TPS limit)
   - Added pagination to `ShardMonitor.getShardList()` to support streams with 
>1000 shards
   - Fixed misleading test name 
`itDoesNotMakeADescribeStreamRequestIfShardIdIsSet` — the test now actually 
verifies no `DescribeStream` call is made
   
   **2. Batch producer applied single partition key to all records**
   - Added new `CamelAwsKinesisPartitionKeys` header (`List<String>`) for 
per-record partition keys in batch `PutRecords`
   - When set, each record gets its own partition key by index, allowing proper 
shard distribution
   - Falls back to single `CamelAwsKinesisPartitionKey` header for records 
beyond the list size
   - Backwards compatible — existing behavior unchanged when new header is 
absent
   
   ## Test plan
   
   - [x] Existing consumer tests pass (fixed-shardId path, closed shard, 
multi-shard)
   - [x] New `Kinesis2ProducerTest` verifies: single partition key behavior, 
per-record partition keys, fallback when list is shorter than records
   - [x] Test now verifies `DescribeStream` is never called when `shardId` is 
configured
   - [x] Module build passes: `mvn verify` in `camel-aws2-kinesis`
   - [x] Upgrade guide entry added for 4.22
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to