camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Why does RouteDefinition have "from" methods?
Date Fri, 12 Sep 2014 05:48:00 GMT
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
<> 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.from("direct:buzz");
> 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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message