[ 
https://issues.apache.org/jira/browse/CAMEL-27889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27889:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-controlbus for 
CAMEL-23832 (commit 
https://github.com/apache/camel/commit/85ea55b80e9f710e1c415febdbba3bc65915daea,
 pull request https://github.com/apache/camel/pull/31155).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. Any command acts as the route command
{{ControlBusComponent.createEndpoint}} does not check the command, and the 
command field is never set: anything other than language:<name> is the route 
command, so controlbus:foo?action=stop&routeId=x stops route x. 
controlbus:language without a name, and a route command without an action, do 
nothing and log nothing ({{ControlBusProducer.process}} skips both).
Proposed change: accept only route and language:<name>, and fail on an empty 
language name or a missing action.

h4. 2. A missing or unknown routeId is silently ignored
A route action other than stats without a routeId is a no-op (start, stop) or 
leaves the body unchanged (status), because AbstractCamelContext looks up 
routeServices.get(null); the same for a routeId that does not exist.
Proposed change: fail when the action needs a routeId and none is set, and 
report an unknown route.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-controlbus for 
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31155).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. Any command acts as the route command
{{ControlBusComponent.createEndpoint}} does not check the command, and the 
command field is never set: anything other than language:<name> is the route 
command, so controlbus:foo?action=stop&routeId=x stops route x. 
controlbus:language without a name, and a route command without an action, do 
nothing and log nothing ({{ControlBusProducer.process}} skips both).
Proposed change: accept only route and language:<name>, and fail on an empty 
language name or a missing action.

h4. 2. A missing or unknown routeId is silently ignored
A route action other than stats without a routeId is a no-op (start, stop) or 
leaves the body unchanged (status), because AbstractCamelContext looks up 
routeServices.get(null); the same for a routeId that does not exist.
Proposed change: fail when the action needs a routeId and none is set, and 
report an unknown route.


_Claude Code on behalf of davsclaus_


> camel-controlbus: an unknown command acts as a route command, a missing 
> language name, action or routeId is silently ignored
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27889
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27889
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-controlbus
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-controlbus for 
> CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/85ea55b80e9f710e1c415febdbba3bc65915daea,
>  pull request https://github.com/apache/camel/pull/31155).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. Any command acts as the route command
> {{ControlBusComponent.createEndpoint}} does not check the command, and the 
> command field is never set: anything other than language:<name> is the route 
> command, so controlbus:foo?action=stop&routeId=x stops route x. 
> controlbus:language without a name, and a route command without an action, do 
> nothing and log nothing ({{ControlBusProducer.process}} skips both).
> Proposed change: accept only route and language:<name>, and fail on an empty 
> language name or a missing action.
> h4. 2. A missing or unknown routeId is silently ignored
> A route action other than stats without a routeId is a no-op (start, stop) or 
> leaves the body unchanged (status), because AbstractCamelContext looks up 
> routeServices.get(null); the same for a routeId that does not exist.
> Proposed change: fail when the action needs a routeId and none is set, and 
> report an unknown route.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to