-
1. Re: Redundant from() in Camel Java DSL
kcbabo Sep 3, 2013 1:43 PM (in response to pzl_mz)It is not possible to get rid of the from() endpoint in Camel routes. Funny enough, we used to allow that to go unspecified but got feedback that it was too funky/different from how Camel routes are traditionally specified. Be that as it may, the switchyard endpoint does have some utility:
1) We allow multiple route definitions in a Java or XML DSL definition pointed to by implementation.camel. Having a from("switchyard://") endpoint clearly identifies which route is the "entry point" for the service.
2) Internal dispatch to a Camel route is done via a SwitchYard camel component, so the endpoint needs to be there one way or the other. Doing it in the background on deployment is possible, but as I mentioned above that seems to create more problems than it solves.