camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seb- <>
Subject Re: Routing depending on a Service
Date Tue, 09 Sep 2008 14:52:27 GMT

Hi James,
Thank you very much for your prompt faster-than-light reply!
That's exactly what I was looking for.
Just as a side note regarding Camel docs, in the FAQ comparison (ie
the newborn spring-integration is not compared (even if I have my own ideas
on the difference).

James.Strachan wrote:
> 2008/9/9 Seb- <>:
>> Hi,
>> I have problems imagining how camel can be used/integrated to route
>> message
>> depending on return from a service call.
>> Let's say I have a file source endpoint that send messages to MyOwnRouter
>> which routes them depending on the return from a call to a service
>> (whatever
>> may that be).
>> In the examples provided in various documentation for Routing, the routes
>> conditions are statically known at startup (when xpath(..)...)
>> Do I need to write an own component ? Would a bean be enough ? Can I use
>> the
>> java DSL then ?
> You can dynamically invoke any expression and use the result of that
> expression to determine what endpoints a message goes to. So you can
> use things like a Dynamic Recipient List...
> You can use any bean method to return the list of endpoints to send it
> to; using Java as the expression language if you prefer.
> e.g.
> from("activemq:Foo").recipientList().methodCall("someBean", "myMethod");
> Then you can use any Java code you like to take the input message &
> headers and use any algorithm you can imagine to figure out where to
> send the message.
> -- 
> James
> -------
> Open Source Integration

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message