This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch chore/azure-blob-concurrent-modification-doc
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4a039cfe0cd63c911ebcca64d79d4c89e4876a72
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 5 23:31:33 2026 +0200

    CAMEL-19254: Document blob ConditionNotMet error during concurrent 
modification
    
    Co-Authored-By: Claude <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../src/main/docs/azure-storage-blob-component.adoc      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
 
b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
index 1f7621f0f247..fcdc6e93dda8 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
@@ -892,6 +892,22 @@ from("direct:rehydrate")
   .to("mock:result");
 
--------------------------------------------------------------------------------
 
+=== Blob modification during download (ConditionNotMet)
+
+When downloading a blob via streaming (the `getBlob` operation or the consumer 
without `fileDir`), the Azure SDK reads the blob in chunks.
+On the first chunk it captures the blob's ETag and uses it as an `if-match` 
condition on subsequent chunk requests.
+If the blob is modified by another process between chunks (which changes its 
ETag), Azure returns HTTP 412 `ConditionNotMet`.
+
+This is by design in the Azure SDK — it ensures read consistency so that you 
do not receive half of one version concatenated with half of another.
+The error is more likely with larger blobs and slower network connections 
(e.g., in real Azure environments versus local emulators).
+
+Workarounds:
+
+* Use the `fileDir` option so the consumer downloads the blob atomically to a 
file via `downloadBlobToFile` instead of streaming.
+* Use blob snapshots — read from an immutable snapshot ID via the `snapshotId` 
option or the `CamelAzureStorageBlobSnapshotId` header, which cannot be 
modified.
+* Use blob versioning — read from a specific version via the `versionId` 
option or the `CamelAzureStorageBlobVersionId` header.
+* Avoid modifying blobs while they are being consumed.
+
 === SAS Token generation example
 
 SAS Blob Container tokens can be generated programmatically or via Azure UI. 
To generate the token with java code, the following can be done:

Reply via email to