Why can I not use when or otherwise in a Java Camel routePage added by Claus IbsenWhy can I not use when/otherwise in a Java Camel route?When using the Content Based Router in the Java DSL you may have a situation where the compiler will not accept the following when() or otherwise() statement.
For example as shown in the route below where we use the Load Balancer inside the Content Based Router in the first when: Code will not compile from("direct:start") .choice() .when(body().contains("Camel")) .loadBalance().roundRobin().to("mock:foo").to("mock:bar") .otherwise() .to("mock:result");
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Camel > Why can I not use when or otherwise in... confluence