Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 92315 invoked from network); 20 Oct 2008 16:34:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Oct 2008 16:34:12 -0000 Received: (qmail 60155 invoked by uid 500); 20 Oct 2008 16:34:14 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 60130 invoked by uid 500); 20 Oct 2008 16:34:14 -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 60119 invoked by uid 99); 20 Oct 2008 16:34:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2008 09:34:14 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of janstey@gmail.com designates 74.125.44.158 as permitted sender) Received: from [74.125.44.158] (HELO yx-out-1718.google.com) (74.125.44.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2008 16:33:02 +0000 Received: by yx-out-1718.google.com with SMTP id 3so284802yxi.86 for ; Mon, 20 Oct 2008 09:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=95lACOrkDZ1QSv5rpXPb4KD1tw1wejqevc+q1hXlTGI=; b=OmKWg79W35Ka4faaXgEHNaBNBO7evRmk/pwnRQRmSnVYktjfY3DzKDkYb4nJiyTMYg OgqnNgc1T9BsVw77/sXkCWf4DxXpzQynOfgB00woKcxsT4hCiHeAefSRuZ17lFCQ1a+N w2UiDifoDzqj83cxHjd/YKE1d5AnfRI5bctCU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=cDBFRYObWL9OC3VCa1yRmZVnY/q09l9tmwcoShNXqj0PFomZAFZLOKuk4y7HB+F7Fb UogRlkBQrlnUCViVv9/kkrW48VKMSaM86zZaSCy2i68Q6puTmXsFLfoeOVZLS7Hh+2pz a8S29IcDG3MHwB5FS3mevmsdwlqz4WtlWmdCs= Received: by 10.64.213.20 with SMTP id l20mr1108750qbg.26.1224520409725; Mon, 20 Oct 2008 09:33:29 -0700 (PDT) Received: from ?10.68.8.180? ([209.128.50.150]) by mx.google.com with ESMTPS id 6sm16237597yxg.6.2008.10.20.09.33.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Oct 2008 09:33:29 -0700 (PDT) Message-ID: <48FCB2D8.5060903@gmail.com> Date: Mon, 20 Oct 2008 14:03:28 -0230 From: Jonathan Anstey Reply-To: janstey@gmail.com User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Claus Ibsen CC: camel-user@activemq.apache.org Subject: Re: How to define dynamically the jms uri ? References: <4C1FB9C00D24A140906239533638C4D205AB7CF6@EXVS04.exserver.dk> In-Reply-To: <4C1FB9C00D24A140906239533638C4D205AB7CF6@EXVS04.exserver.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org *** replaces camel dev hat with camel user hat Yeah, I agree with doing whatever is easier too :) Claus Ibsen wrote: > Hi > > Ah yeah you can do a lot in DSL but sometimes it just easier to add a plain POJO bean (or processor) that does the trick, then it's plain readable Java code that everyone knows to read ;) > > > Med venlig hilsen > > Claus Ibsen > ...................................... > Silverbullet > Skovsg�rdsv�nget 21 > 8362 H�rning > Tlf. +45 2962 7576 > Web: www.silverbullet.dk > > -----Original Message----- > From: Jonathan Anstey [mailto:janstey@gmail.com] > Sent: 20. oktober 2008 17:59 > To: camel-user@activemq.apache.org > Subject: Re: How to define dynamically the jms uri ? > > Sounds like you want to first split quotes.xml using a splitter, then > set a header containing the topic name, and finally send to a dynamic > recipient list routing on the header you just created. > > So something like this (I haven't tried this, so you may need some small > edits :) ) > > from(uri="file=///c:/temp/quotes.xml").splitter(xpath("//price")) > .setHeader("stock").xpath("/price/@stock", String.class) > .setHeader("queueName").simple("jms:topic:STOCKS.${in.header.stock}") > .recipientList(header("queueName")); > > cmoulliard wrote: > >> Hi, >> >> I would like to know it this is possible to define dynamically the jms uri ? >> I explain. >> In a XML file, I have several lines, one by market symbol : >> >> >> >> Depending on the stock name, I would like to send the line to a topic name >> for which the name will be STOCKS.MSFT or STOCKS.SUNW or STOCKS.*. * means >> that depending on the stock name, the stock name must be concatenated to the >> topic STOCKS >> >> from(uri="file=///c:/temp/quotes.xml") >> .to(jms:topic:STOCKS.*) >> >> KR, >> >> Charles Moulliard >> >> ----- >> Enterprise Architect >> >> Xpectis >> 12, route d'Esch >> L-1470 Luxembourg >> >> Phone +352 25 10 70 470 >> Mobile +352 621 45 36 22 >> >> e-mail : cmoulliard@xpectis.com >> web site : www.xpectis.com www.xpectis.com >> My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ >> >> > >