davsclaus opened a new pull request, #30768: URL: https://github.com/apache/camel/pull/30768
_Claude Code on behalf of davsclaus_ JIRA: [CAMEL-27538](https://issues.apache.org/jira/browse/CAMEL-27538), a follow-up of CAMEL-27101 (#30748). ## What was wrong `azure-files:application-cloudevents` set `CamelCloudEventSource` to `azure.storage.files.` plus `CamelFileHost`, the host of the storage account (for example `myaccount.file.core.windows.net`). The source named the account, not the share the files were consumed from, so two routes polling two shares of one account emitted events with the same source. Since CAMEL-27101 the queue, blob and datalake transformers use the queue, container and file system; files was the only Azure Storage source left on something else. ## What changed - `FilesConstants`: new consumer header `CamelAzureFilesShareName`, the name of the share the file was consumed from. - `FilesConsumer.createExchange`: sets it from the `share` of the endpoint. It is a header and not the from endpoint of the exchange for the reason given in #29216 and #30748: the output data type of a Kamelet runs in the route that consumes from the Kamelet. - `AzureFilesCloudEventDataTypeTransformer`: the source is `azure.storage.files.<share name>`. A message without the header gets no source, also when it has `CamelFileHost`. The subject (file name) and the id (exchange id) are unchanged. - Upgrade guide 4.24: added to the CAMEL-27101 entry (a row in the table, the new header in the list). The heading now also says "share". - Regenerated the component JSON, its catalog copy and the endpoint DSL header builder. ## Tests - `AzureFilesCloudEventDataTypeTransformerTest`: two files of one share get the same source, which names the share and not the host; a message with only `CamelFileHost` gets no source. - New `FilesConsumerShareNameTest`: the exchange the consumer creates for a polled file has the share name (with and without a starting directory) next to `CamelFileHost`, and the transformer gives `azure.storage.files.<share>` for it. - `mvn test` in camel-azure-files: 58 tests, 0 failures. ## Kamelets `azure-storage-files-source` documents the source as "the Host name of the share" and needs the same change; it can go in apache/camel-kamelets#3397 with the other CAMEL-27101 descriptions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
