You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/10/12 12:20:05 UTC

[camel-kamelets] 01/03: Switch Azure Storage Blob Source from timer producer style to a pure consumer

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

acosentino pushed a commit to branch azure-storage-blob-source-pure-consumer
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 053478418a5f647665e4dbbd2f2658a2cd1651bf
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Oct 12 14:07:32 2022 +0200

    Switch Azure Storage Blob Source from timer producer style to a pure consumer
---
 kamelets/azure-storage-blob-source.kamelet.yaml    | 41 ++++++----------------
 .../azure-storage-blob-source.kamelet.yaml         | 41 ++++++----------------
 2 files changed, 20 insertions(+), 62 deletions(-)

diff --git a/kamelets/azure-storage-blob-source.kamelet.yaml b/kamelets/azure-storage-blob-source.kamelet.yaml
index 01c333c5..d4ed8cd1 100644
--- a/kamelets/azure-storage-blob-source.kamelet.yaml
+++ b/kamelets/azure-storage-blob-source.kamelet.yaml
@@ -75,37 +75,16 @@ spec:
     - "camel:timer"
   template:
     from:
-      uri: "timer:azure-storage-blob-stream"
+      uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
       parameters:
-        period: "{{period}}"
+        accessKey: "{{accessKey}}"
+        credentialType: "{{credentialType}}"
       steps:
-      - to:
-          uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
-          parameters:
-            operation: "listBlobs"
-            accessKey: "{{accessKey}}"
-            credentialType: "{{credentialType}}"
-      - split:
-          jsonpath: "$.*"
-          steps:
-          - set-property:
-              name: azureBlobName
-              simple: ${body.name}
-          - set-header:
-              name: CamelAzureStorageBlobBlobName
-              simple: ${exchangeProperty.azureBlobName}
-          - to:
-              uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
-              parameters:
-                operation: "getBlob"
-                accessKey: "{{accessKey}}"
-          - to: "kamelet:sink"
-          - set-header:
-              name: CamelAzureStorageBlobBlobName
-              simple: ${exchangeProperty.azureBlobName}
-          - to:
-              uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
-              parameters:
-                operation: "deleteBlob"
-                accessKey: "{{accessKey}}"
+        - to: "kamelet:sink"
+        - to:
+            uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
+            parameters:
+              operation: "deleteBlob"
+              accessKey: "{{accessKey}}"
+              credentialType: "{{credentialType}}"
 
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 01c333c5..d4ed8cd1 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
@@ -75,37 +75,16 @@ spec:
     - "camel:timer"
   template:
     from:
-      uri: "timer:azure-storage-blob-stream"
+      uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
       parameters:
-        period: "{{period}}"
+        accessKey: "{{accessKey}}"
+        credentialType: "{{credentialType}}"
       steps:
-      - to:
-          uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
-          parameters:
-            operation: "listBlobs"
-            accessKey: "{{accessKey}}"
-            credentialType: "{{credentialType}}"
-      - split:
-          jsonpath: "$.*"
-          steps:
-          - set-property:
-              name: azureBlobName
-              simple: ${body.name}
-          - set-header:
-              name: CamelAzureStorageBlobBlobName
-              simple: ${exchangeProperty.azureBlobName}
-          - to:
-              uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
-              parameters:
-                operation: "getBlob"
-                accessKey: "{{accessKey}}"
-          - to: "kamelet:sink"
-          - set-header:
-              name: CamelAzureStorageBlobBlobName
-              simple: ${exchangeProperty.azureBlobName}
-          - to:
-              uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
-              parameters:
-                operation: "deleteBlob"
-                accessKey: "{{accessKey}}"
+        - to: "kamelet:sink"
+        - to:
+            uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
+            parameters:
+              operation: "deleteBlob"
+              accessKey: "{{accessKey}}"
+              credentialType: "{{credentialType}}"