Croway opened a new pull request, #30168: URL: https://github.com/apache/camel/pull/30168
JIRA: [CAMEL-27015](https://issues.apache.org/jira/browse/CAMEL-27015) - With `deleteAfterRead` or `moveAfterRead`, the `aws2-s3` and `azure-storage-blob` consumers took the key, the bucket and the blob name from the headers when the exchange completed, and `aws2-sqs` took the receipt handle from its header. A route that set these headers (for example to write a copy of the object under another name) deleted or moved that copy. A route that removed them, or replaced the message, left the object or the message in place, and it was consumed again. - The consumers now take the key (from the exchange property the S3 consumer sets), the blob name and the receipt handle before the exchange is routed, and pass them to a new `processCommit(Exchange, String)`. The S3 move copies from the bucket of the endpoint, as the delete already did. `processCommit(Exchange)` is kept for subclasses. - `AWS2S3Consumer.processCommit` catches `SdkException` instead of `AwsServiceException`, so a failure raised by the client itself reaches the exception handler of the consumer. - Same approach as CAMEL-25945 for `azure-storage-queue`. Tests: `AWS2S3ConsumerDeleteMoveAfterReadTest` (4 of 6 fail before the fix), `BlobConsumerDeleteMoveAfterReadTest` (3 of 5), `SqsConsumerDeleteMessageTest` (2 of 3); the other tests are controls that pass before and after. All pass with the fix. The `FakeS3Server` of the S3 tests now records deletes and answers copies. Upgrade guide: new 4.24 entry "camel-aws2-s3, camel-azure-storage-blob, camel-aws2-sqs - the consumer deletes or moves what it consumed". _Claude Code on behalf of Federico Mariani_ -- 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]
