davsclaus opened a new pull request, #24884: URL: https://github.com/apache/camel/pull/24884
## Summary _Claude Code on behalf of davsclaus_ Fixes 9 medium and high-severity bugs found in a deep code review of 5 Azure components (blob, servicebus, eventhubs, queue, datalake). See [CAMEL-24158](https://issues.apache.org/jira/browse/CAMEL-24158). ### azure-storage-blob (4 fixes) - **Lease ID lost on discarded BlobRequestConditions** — `getCommonRequestOptions()` now ensures `BlobRequestConditions` is never null, so `acquireLeaseIfConfigured()` mutates the shared reference visible at all 7+ call sites - **Non-mark InputStream uploaded as 0-byte blob** — added `StreamCache` and `FileInputStream` fast paths in `BlobUtils.getInputStreamLength()` (aligned with AWS S3 pattern), wrap non-mark streams in `BufferedInputStream` in `BlobStreamAndLength` and `BlobBlock`, return -1 instead of 0 for unknown length - **moveAfterRead copy via bare URL without SAS** — switched from `copyFromUrl()` (requires publicly accessible URL or SAS) to `beginCopy()` (supports same-account shared key auth) with configurable timeout - **Page-blob range off-by-one** — `end - start` → `end - start + 1` ### azure-servicebus (1 fix) - **processMessage exception leaks pendingExchanges** — wrapped message processing in try-catch after `pendingExchanges.incrementAndGet()`, ensuring counter is always decremented and messages are abandoned (PEEK_LOCK) on error ### azure-eventhubs (2 fixes) - **Consumer sets both PARTITION_ID and PARTITION_KEY; producer throws** — only set `PARTITION_KEY` header when `eventData.getPartitionKey()` is non-null - **All Camel headers leak to AMQP application properties** — `EventHubsComponent` now extends `HeaderFilterStrategyComponent`, producer filters headers through `DefaultHeaderFilterStrategy` before putting on `EventData` ### azure-storage-queue (1 fix) - **popReceipt clobbered by completion handler** — removed the stale header save/restore mechanism that was restoring pre-processing values, breaking `deleteMessage` after mid-route `updateMessage` calls ### azure-storage-datalake (1 fix) - **openInputStream uses Blob Query API** — replaced `openQueryInputStream("SELECT * from BlobStorage")` + `SkipLastByteInputStream` workaround with standard `client.openInputStream().getInputStream()`. Deprecated `SkipLastByteInputStream` in `camel-util` ## Test plan - [x] `camel-azure-storage-blob` unit tests pass - [x] `camel-azure-servicebus` unit tests pass - [x] `camel-azure-eventhubs` unit tests pass (updated IT constructor calls for new parameter) - [x] `camel-azure-storage-queue` unit tests pass - [x] `camel-azure-storage-datalake` unit tests pass - [ ] CI green 🤖 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]
