Christoph Deppisch created CAMEL-22699:
------------------------------------------
Summary: Camel JBang run --stub affects all endpoints
Key: CAMEL-22699
URL: https://issues.apache.org/jira/browse/CAMEL-22699
Project: Camel
Issue Type: Bug
Components: camel-jbang
Affects Versions: 4.16.0
Reporter: Christoph Deppisch
The Camel JBang run command supports --stub option to stub components in a
route.
Given this route:
{noformat}
- from:
uri: "direct:echo"
steps:
- transform:
simple: "${body.toUpperCase()}"
- to:
uri: "kafka:inbox?brokers=localhost:9092"{noformat}
When user runs the route via Camel JBang with enabled stub:
{noformat}
camel run route.yaml --stub=kafka{noformat}
I would expect the stub to only work for components/endpoints that are
specified in the option (kafka component only). It seems the stub option
affects all endpoints in the route including transform EIPs.
{noformat}
camel cmd receive
PID NAME AGE STATUS TOTAL SINCE ENDPOINT
17169 route 27s Enabled 0 kafka://inbox{noformat}
I can see the stub being enabled for kafka but the stub also affects the
transform EIP in the route. The result is that the transform in the route
always returns the body as null.
When the stub option is removed the transform EIP works as expected.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)