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

Work on CAMEL-21895 started by Pasquale Congiusti.
--------------------------------------------------
> REST DSL only pick last .to() definition if there are multiple definitions
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-21895
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21895
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 4.10.2
>         Environment: Camel 4.10.2
>            Reporter: hisao furuichi
>            Assignee: Pasquale Congiusti
>            Priority: Minor
>             Fix For: 4.11.0
>
>
> REST DSL only pick last .to() definition if there are multiple definitions 
> and silently ignore lest of .to() definitions.
> Camel route
> {noformat}
>      public void configure() throws Exception {
>         restConfiguration().bindingMode(RestBindingMode.auto);
>         rest("/fruits")
>                 .get()
>                     .to("direct:getFruits")
>                     .to("direct:getFruits2");
>         from("direct:getFruits").routeId("getFruits")
>                 .setBody().constant(fruits)
>                 .log("=== route getFruits finished");
>         from("direct:getFruits2").routeId("getFruits2")
>                 .setBody().constant(fruits)
>                 .log("=== route getFruits2 finished");
>     }{noformat}
> Log
> {noformat}
> 2025-03-25 12:37:05,866 INFO  [io.quarkus] (Quarkus Main Thread) Installed 
> features: [camel-attachments, camel-core, camel-direct, camel-jackson, 
> camel-platform-http, camel-rest, cdi, smallrye-context-propagation, vertx]
> 2025-03-25 12:37:13,522 INFO  [Routes:54] (vert.x-worker-thread-1) === route 
> getFruits2 finished {noformat}
> It looks like REST DSL silently ignores ".to("direct:getFruits")".
> Please consider to log WARN message or something.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to