Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 54453 invoked from network); 23 Oct 2009 13:46:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Oct 2009 13:46:39 -0000 Received: (qmail 75642 invoked by uid 500); 23 Oct 2009 13:46:38 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 75626 invoked by uid 500); 23 Oct 2009 13:46:38 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 75616 invoked by uid 99); 23 Oct 2009 13:46:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 13:46:38 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.211 as permitted sender) Received: from [209.85.218.211] (HELO mail-bw0-f211.google.com) (209.85.218.211) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 13:46:34 +0000 Received: by bwz3 with SMTP id 3so1081752bwz.36 for ; Fri, 23 Oct 2009 06:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=aWHxs8m6D+qMUImQrxvdDDYE/v2vB0y664waMF+y/dg=; b=ZwUzBYLywhZdghSnve5CtXu80hGfu8pupIfiDcMwFRpTTMLEMyWeDP+N+S81UQj17m CE/QGB1ZW1wlxFZ31PG/3h1OtieL916KRlnazZwlYPQIIzihqjxjtvVIR6y5WXQz2riL LN9MRkNlENMgHFetQYfrtPWG+QTneo5HLJfDY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=t742hW3UiEaN7iCoXLb+4H621grz0K7ZY/eLA5gwPSk2QiOMb9y58ENd1xafs9TV4X ZVRcRCYNwQ6hoZ73+1ERnkB13qD2vwDbvWJBOO3Fgel/EwGQysMpItKeMri3rNOuqmDQ 4Xqtrqk9YbW1U5Ld1UtSQR9h2mWQmv5HSi5vg= MIME-Version: 1.0 Received: by 10.204.34.194 with SMTP id m2mr8369346bkd.53.1256305572477; Fri, 23 Oct 2009 06:46:12 -0700 (PDT) In-Reply-To: <26026377.post@talk.nabble.com> References: <26017552.post@talk.nabble.com> <5380c69c0910230046x4adb871fu3a8792038630b39f@mail.gmail.com> <26026377.post@talk.nabble.com> From: Claus Ibsen Date: Fri, 23 Oct 2009 15:45:51 +0200 Message-ID: <5380c69c0910230645i633fac86mda35cbf41c7875d1@mail.gmail.com> Subject: Re: Dynamic uri in uri, derived from uri To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Oct 23, 2009 at 3:23 PM, chris.pond wrote: > > > > Claus Ibsen-2 wrote: >> >> I think you have the from topic as a JMSDestination header on the messag= e. >> But I havent checked >> >> Destination topic =3D exchange.getIn().getHeader("JMSDestination", >> Destination.class); >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > Excellent! That's exactly what I need. However, I'm a little at a loss as= to > how to get the "exchange" instance, and then use a method on that within = the > Xml configuration for ActiveMQ. Can I just use JUEL, something like: > > =A0 > =A0 > > > If this works, I'd also like to strip off the "topic://" at the front of = the > JMSDestination. Can I do this with a substring() call, like this? > ... > =A0 > ... The JMSDestination is a real javax.jms.Destination object and it may print out a nice jms name if you invoke its toString. Otherwise there is the getTopicName for the Topic destination. You cannot do this As you cannot do that in spring. However you can use a recipient list to compute where to go http://camel.apache.org/recipient-list.html This is the correct EIP to use in your use case Then just compute the endpoint using juel or whatever and store it in a hea= der queue.${in.headers.JMSDestination.topicName()}
foo
> Thanks! > > > -- > View this message in context: http://www.nabble.com/Dynamic-uri-in-%3Cto%= 3E-uri%2C-derived-from-%3Cfrom%3E-uri-tp26017552p26026377.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus