You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Christian Schneider <ch...@die-schneider.net> on 2017/04/12 08:58:35 UTC

Example on wiki page for Message Router wrong?

There is an interesting question on stackoverflow:
http://stackoverflow.com/questions/43363757/difference-between-message-router-and-content-based-router-in-eip

I think there is a difference between Messsage Router and Content-based 
Router but the wiki shows the same example for both.

So I think the correct example for a Message Router would be something 
like this:

|from("jms:in")|
|.||choice()|
|||.when(header("foo").isEqualTo("bar"))|
|||.to("jms:bar")|
|||.when(header("foo").isEqualTo("cheese"))|
|||.to("jms:cheese")|
|    .||otherwise()|
|||.to("jms:other");|

What do you think?

Christian

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com