New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To-D doesn't work in a Kamelet #449
Comments
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
name: azure-storage-blob-source
spec:
definition:
title: "Azure Storage Blob Source"
description: |-
Consume Files from Azure Storage Blob.
required:
- period
- accountName
- containerName
- accessKey
type: object
properties:
period:
title: Period between Polls
description: The interval between fetches to the Azure Storage Container in milliseconds
type: integer
default: 10000
accountName:
title: Account Name
description: The Azure Storage Blob account name.
type: string
containerName:
title: Container Name
description: The Azure Storage Blob container name.
type: string
accessKey:
title: Access Key
description: The Azure Storage Blob access Key.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
dependencies:
- "camel:azure-storage-blob"
- "camel:kamelet"
- "camel:core"
- "camel:jsonpath"
- "camel:timer"
flow:
from:
uri: "timer:azure-storage-blob-stream"
parameters:
period: "{{period}}"
steps:
- to:
uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
parameters:
operation: "listBlobs"
accessKey: "{{accessKey}}"
- split:
jsonpath: "$.*"
steps:
- set-property:
name: azureBlobName
simple: ${body.name}
- to-d: "azure-storage-blob:{{accountName}}/{{containerName}}?accessKey=RAW({{accessKey}})&operation=getBlob&blobName=${exchangeProperty.azureBlobName}"
- to: "kamelet:sink" @davsclaus I think the |
@lburgazzoli yeah toD and recipientList etc that compute dynamic endpoint uris would be affected. Can you create a JIRA ticket |
I created a JIRA |
If you can use headers then that is often better as this avoids creating dynamic endpoints which has higher overhead than static endpoints. |
For azure i solved in that way, there is still the Dropbox source kamelet and in that case the headers cannot be used because the component is not using the for producer operations |
Okay a source with a "from" endpoint is not dynamic so there is no problem there. |
wonder if the DefaultComponent should automatically resolve the placeholders when computing the remaining part of the uri that is used to invoke createEndpoint |
The source is done with a timer as from. Because there is no real consumer. So it's timer+producer. Like azure storage blob too |
Okay so its specific the toD EIP that via the uri checks if the component is a special toD optimized (send dynamic aware) and this is causing this problem. The route template do create the endpoint with the resolved parameters from the template, so that is correct. So fixing this in toD and this should work afterwards. |
Fixed in Camel 3.12 |
With 1.5.0 the parameter substitution won't work in a to-d, like for example azure-storage-blob source and dropbox source.
We have some workaround, like setting an exchange property and then work through headers, but I think we need to address the situation.
The text was updated successfully, but these errors were encountered: