Croway opened a new pull request, #30224: URL: https://github.com/apache/camel/pull/30224
JIRA: [CAMEL-27065](https://issues.apache.org/jira/browse/CAMEL-27065) - A `to` resolves its endpoint once, when the route is created, so `to("jms:queue:${header.q}")` sends every message to one endpoint named by the text of the expression. The route started without any warning; only `camel validate` and the YAML DSL validator reported it. - `SendReifier` now logs a WARN for such a `to` that says to use `toD`. The route works as before. The rule is the one of the offline checks (CAMEL-24917, CAMEL-24918): only the path is looked at, not the options after the `?`; the `language` component, the `:#${...}` and `:#in:${...}` parameters of `sql`, and the components whose path option has `supportSimpleExpression` in their metadata are left alone. A component without metadata is left alone too. - The template of `sql-stored` and the bucket name of `aws2-s3` are evaluated for each message but their metadata did not say so: their path options now have `supportSimpleExpression` (component JSON and catalog regenerated), which also keeps `camel validate` from reporting them. - Docs: the To EIP page says when the WARN is logged and what is left alone. Tests: `SendReifierExpressionInUriTest` (camel-core, 9 tests): the three WARN cases (expression in the path, from a property placeholder, a component whose metadata does not evaluate its path) fail before and pass after; the six controls (`toD`, expression in the options, `language`, a component whose metadata evaluates its path, a component without metadata, `:#${...}` / `:#in:${...}` parameters) pass both ways. The camel-core reifier, `To*`, route template, Kamelet, placeholder and simple tests (637) and the camel-sql `stored` tests (55, no WARN logged) pass. Upgrade guide: "camel-core - a to with an expression in its endpoint uri logs a WARN" in `camel-4x-upgrade-guide-4_24.adoc`. _Claude Code on behalf of Federico Mariani_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
