A route definition can have more inputs, so when you call from 2 or more times, its multiple inputs to the same route. Though that is not so commonly used as people most often have only 1 input to a route, and hence only use from once.
On Fri, Sep 12, 2014 at 12:54 AM, toomanyedwards <toomanyedwa...@gmail.com> wrote: > Hey all, > I'm still climbing the learning curve on Camel terminology, etc. It makes > sense to me that I start defining a route by calling RouteBuilder.from and > get a RouteDefinition which I can then use to continue to define my route. > What makes less sense to me is that RouteDefinition itself has "from" > methods on it so I can do something like: > > myRouteDefinition = routeBuilder.from("direct:foo"); > myRouteDefinition.to("direct:doSomething"); > > myRouteDefinition.from("direct:buzz"); > myRouteDefinition.to("direct:doSomethingElse"); > > Conceptually, I think of a RouteDefinition as defining one route, but in the > example above we can use the same RouteDefinition to essentially define two > completely unrelated routes from what I can tell. What's the use case for > this vs using the routeBuilder again to create a completely new > RouteDefinition for the "buzz" route. i.e. - > routeBuilder.from("direct:buzz") > > > I have been loving Camel so far. Thanks in advance for helping clear up > this confusion for me so I can understand more about it. > > -e > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Why-does-RouteDefinition-have-from-methods-tp5756370.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/