You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Erik Allais <er...@altervisions.com> on 2007/08/10 17:38:40 UTC

Content based router

Hi, im new with the eip 
i read in the eip book that 

"A key property of the Message Router (content based router) is that it does
not modify the message contents. It only concerns itself with the
destination of the message."

I wonder if there is a pattern which route and change the message content at
the same time.
I wont avoid to use a Message translator after the router.

Regards,
Erik

-- 
View this message in context: http://www.nabble.com/Content-based-router-tf4249476s22882.html#a12093722
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Content based router

Posted by James Strachan <ja...@gmail.com>.
On 8/10/07, Erik Allais <er...@altervisions.com> wrote:
>
> How can i create this composite router? with the processor?

Yeah...

from("foo").choice().
  when(xpath("/foo/bar")).process(someProcesor).to("seda:a")
  otherwise().to("seda:b");

notice how we can mix and match arbitrary processors or endpoints
inside the route.
-- 
James
-------
http://macstrac.blogspot.com/

Re: Content based router

Posted by Erik Allais <er...@altervisions.com>.
How can i create this composite router? with the processor?


James.Strachan wrote:
> 
> On 8/10/07, Erik Allais <er...@altervisions.com> wrote:
>>
>> Hi, im new with the eip
>> i read in the eip book that
>>
>> "A key property of the Message Router (content based router) is that it
>> does
>> not modify the message contents. It only concerns itself with the
>> destination of the message."
>>
>> I wonder if there is a pattern which route and change the message content
>> at
>> the same time.
>> I wont avoid to use a Message translator after the router.
> 
> You can mix and match patterns together to make a composite router
> which includes multiple EIP patterns; so there's nothing stopping you
> using a Message Translator (or indeed any Camel Processor or bean)
> within a content based router.
> 
> http://activemq.apache.org/camel/processor.html
> http://activemq.apache.org/camel/bean-integration.html
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Content-based-router-tf4249476s22882.html#a12094032
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Content based router

Posted by James Strachan <ja...@gmail.com>.
On 8/10/07, Erik Allais <er...@altervisions.com> wrote:
>
> Hi, im new with the eip
> i read in the eip book that
>
> "A key property of the Message Router (content based router) is that it does
> not modify the message contents. It only concerns itself with the
> destination of the message."
>
> I wonder if there is a pattern which route and change the message content at
> the same time.
> I wont avoid to use a Message translator after the router.

You can mix and match patterns together to make a composite router
which includes multiple EIP patterns; so there's nothing stopping you
using a Message Translator (or indeed any Camel Processor or bean)
within a content based router.

http://activemq.apache.org/camel/processor.html
http://activemq.apache.org/camel/bean-integration.html


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