Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 55936 invoked from network); 9 Sep 2008 14:52:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Sep 2008 14:52:59 -0000 Received: (qmail 92553 invoked by uid 500); 9 Sep 2008 14:52:57 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 92535 invoked by uid 500); 9 Sep 2008 14:52:57 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 92524 invoked by uid 99); 9 Sep 2008 14:52:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 07:52:57 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 14:51:57 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Kd4Zv-00031e-QC for camel-user@activemq.apache.org; Tue, 09 Sep 2008 07:52:27 -0700 Message-ID: <19394080.post@talk.nabble.com> Date: Tue, 9 Sep 2008 07:52:27 -0700 (PDT) From: Seb- To: camel-user@activemq.apache.org Subject: Re: Routing depending on a Service In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: seba.public@gmail.com References: <19393604.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 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 http://activemq.apache.org/camel/how-does-camel-compare-to-servicemix.html) the newborn spring-integration is not compared (even if I have my own ideas on the difference). Thanks, Regards, S=C3=A9bastien. James.Strachan wrote: >=20 > 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 MyOwnRoute= r >> 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 route= s >> 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 ? >=20 > 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... >=20 > http://activemq.apache.org/camel/recipient-list.html >=20 > 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. >=20 > e.g. >=20 > from("activemq:Foo").recipientList().methodCall("someBean", "myMethod"); >=20 > 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. > http://activemq.apache.org/camel/bean-language.html > http://activemq.apache.org/camel/bean-integration.html >=20 > --=20 > James > ------- > http://macstrac.blogspot.com/ >=20 > Open Source Integration > http://open.iona.com >=20 >=20 --=20 View this message in context: http://www.nabble.com/Routing-depending-on-a-= Service-tp19393604s22882p19394080.html Sent from the Camel - Users mailing list archive at Nabble.com.