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
camel-kamelet: improve global properties handling #560
Comments
On top of my head there is some components that have property prefix, like camel-http with http client options (mind that the http component is one of the more complex component for this kind) I think rabbitmq and some others have a bit simpler code for this option prefix options. Maybe we could have something like that, then its
Then |
oh, that's cool and yes that would do what I'm looking for |
@davsclaus do you think we can have something for this in 3.7 ? |
Yeah have you tried that extract property thingy? And if so then there should likely only need code changes in camel-kamelet component and not in core camel |
not yet |
Okay if you dont find the time and when I get the compiled simple done, then I can take a look |
Ok, so after we get CAMEL-15886, CAMEL-15887 solved and we get camel 3.7 out then we can get this working. At the moment we can use |
Fixed by #573 |
The way the
kamelet
component handles properties as today is:But there are some issue with that:
routeId
may be confusing as it can be used for setting a template property and as a root for the materialized route propertiescamel.component.${scheme}
A possible alternative is to to leverage camel's capabilities to use map, something like:
However it looks quite ugly, a better option would be:
But I don't think camel is currently able to handle this case so we should probably enhance the properties binding support, as example we can mark a component to be
PropertiesAware
so the binding process should not try to bind the entire object tree but it delegates the mapping to the receiver object.Assuming the component would have been something like:
The binding process then can stop at
camel.component.kamelet.template-properties[${templateId}]
andcamel.component.kamelet.route-properties[${routeId}]
and any further processing should be eventually done by the receiver.@davsclaus does this make any sense ?
@nicolaferraro would the new format be problematic for the operator ? (we'll keep the old way for some time in any case)
The text was updated successfully, but these errors were encountered: