hisao furuichi created CAMEL-21895:
--------------------------------------
Summary: REST DSL silently ignore 1st .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
REST DSL silently ignore 1st .to() definition if there are multiple 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)