You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Artur Karazniewicz <ka...@aster.pl> on 2007/08/18 14:03:25 UTC

Camel chained routing

Hi all

I just started to look at Camel, have played with few examples. I just want
to know if is it possible to chain messages through few endpoints, this way:

from("foo").to("bar").to("baz").to("sec") etc. The way similar to pipelines
- i.e output of preceding endpoint becomes an input to next endpoint (just
like in pipeline). Having this, it would be possible to have really
powerful, don't hesitate to say ;) - well - workflow of some kind.

Artur

 
-- 
View this message in context: http://www.nabble.com/Camel-chained-routing-tf4290106s22882.html#a12212932
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel chained routing

Posted by James Strachan <ja...@gmail.com>.
On 8/18/07, Artur Karazniewicz <ka...@aster.pl> wrote:
>
> Hi all
>
> I just started to look at Camel, have played with few examples. I just want
> to know if is it possible to chain messages through few endpoints, this way:
>
> from("foo").to("bar").to("baz").to("sec") etc. The way similar to pipelines
> - i.e output of preceding endpoint becomes an input to next endpoint (just
> like in pipeline). Having this, it would be possible to have really
> powerful, don't hesitate to say ;) - well - workflow of some kind.

Definitely!

You can also do

  from("foo").to("bar", "baz", "sec")

to save a bit of typing.

By default things are chained piplines; so the output of "bar" goes to
"baz" etc.

If you don't want that and want to clone the message exchange to each
destination you can use multicast...

  from("foo").multicast().to("bar", "baz", "sec")

By default things are synchronous; so the same caller thread invokes
bar/baz/sec - which is useful for declarative transaction handling
etc.

If you want to make things async, just add a seda step...

  from("foo").to("bar", "seda:baz-n-sec");
  from("seda:baz-n-sec").to("baz", "sec")


-- 
James
-------
http://macstrac.blogspot.com/