Claus Ibsen created CAMEL-25978:
-----------------------------------
Summary: camel-controlbus - the language command is off by
default, with an option that lists the languages it may use
Key: CAMEL-25978
URL: https://issues.apache.org/jira/browse/CAMEL-25978
Project: Camel
Issue Type: Improvement
Components: camel-controlbus
Reporter: Claus Ibsen
Fix For: 4.24.0
The language command of the control bus ({{controlbus:language:<name>}})
evaluates the message body as an expression of the language named in the uri,
such as simple or groovy ({{ControlBusProducer}}, main e6885df7894d, lines
120-124). It works for every language on the class path, and nothing has to
turn it on.
Proposal:
* a new option {{allowedLanguages}} on the component and the endpoint: the
names of the languages the language command may use, such as {{simple}}. It is
empty by default, so the language command is off until the route or its
configuration turns it on;
* a {{controlbus:language:<name>}} endpoint whose language is not in the list
fails when it is created, with an error that names the option;
* the route actions ({{controlbus:route?action=...}}) do not change;
* the changed default goes in the 4.24 upgrade guide, and the component docs
show the option in the language examples.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)