This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 528ff08328bbf46ee34b5dd52dd1a0c08426cae4 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Fri Oct 28 09:34:58 2022 +0200 Azure Storage Blob Source Kamelet: Add a deleteAfterRead parameter Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../azure-storage-blob-source.kamelet.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml index 85357e27..c8a51e8f 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml @@ -68,6 +68,11 @@ spec: description: The number of milliseconds before the next poll of the selected blob. type: integer default: 500 + deleteAfterRead: + title: Auto-delete Blob + description: Specifies to delete blobs after consuming them + type: boolean + default: false dependencies: - "camel:azure-storage-blob" - "camel:kamelet" @@ -98,10 +103,15 @@ spec: - process: ref: "{{duplicateHeaders}}" - to: "kamelet:sink" - - to: - uri: "azure-storage-blob:{{accountName}}/{{containerName}}" - parameters: - operation: "deleteBlob" - accessKey: "{{accessKey}}" - credentialType: "{{credentialType}}" + - choice: + precondition: true + when: + - simple: '${properties:deleteAfterRead:true}' + steps: + - to: + uri: "azure-storage-blob:{{accountName}}/{{containerName}}" + parameters: + operation: "deleteBlob" + accessKey: "{{accessKey}}" + credentialType: "{{credentialType}}"