camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: How to define dynamically the jms uri ?
Date Mon, 20 Oct 2008 15:58:04 GMT
Hi

You are looking for the dynamic recipients EIP pattern
http://activemq.apache.org/camel/recipient-list.html

So just add the endpoint URI as a header on the exchange and then refer to this header in
the route, example in the link above.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: cmoulliard [mailto:cmoulliard@gmail.com] 
Sent: 20. oktober 2008 15:55
To: camel-user@activemq.apache.org
Subject: How to define dynamically the jms uri ?


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 :
<price stock="MSFT" bid="2.008" offer=2.012" movement="2"/>
<price stock="SUNW" bid="1.34" offer="1.35" movement="2"/>

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/  
-- 
View this message in context: http://www.nabble.com/How-to-define-dynamically-the-jms-uri---tp20067678s22882p20067678.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message