It looks like the issue is the carriage return at the end of the queue name; if you remove that it should be fine.
(We should probably patch the getEndpoint() method in Camel to trim the URL first) 2008/10/21 cmoulliard <[EMAIL PROTECTED]>: > > Many thanks for your help. > > I try to implement what you propose bu I receive on the console the > following error "No endpoint could be found for : "jms:topic:STOCK.BEAS" > > Remark : BEAS is a stock name. > > Here is my code and the log generated : > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:context="http://www.springframework.org/schema/context" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd > http://www.springframework.org/schema/context > http://www.springframework.org/schema/context/spring-context-2.5.xsd > http://activemq.apache.org/camel/schema/spring > http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> > > <!-- ActiveMQ brokerURL using VM protocol --> > <bean id="jms" > class="org.apache.activemq.camel.component.ActiveMQComponent"> > <property name="brokerURL" > value="vm://localhost:61616?broker.persistent=false" /> > </bean> > > <bean id="camelTracer" > class="org.apache.camel.processor.interceptor.Tracer"> > <property name="traceExceptions" value="false" /> > <property name="traceInterceptors" value="true" /> > <property name="logLevel" value="FATAL" /> > <property name="logName" value="com.xpectis.tracker" /> > </bean> > > <bean id="traceFormatter" > class="org.apache.camel.processor.interceptor.TraceFormatter"> > <property name="showBody" value="true" /> > <property name="showHeader" value="true" /> > <property name="showBodyType" value="false" /> > <property name="showBreadCrumb" value="false" /> > </bean> > > <camelContext id="camel" trace="true" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <jmxAgent id="agent" createConnector="true" /> > <route> > <from uri="file:///d:/temp/quotes/?delete=false" /> > <splitter> > <xpath>//price</xpath> > <setHeader headerName="stock"> > <xpath>//price/@stock</xpath> > </setHeader> > <setHeader headerName="queueName"> > > <simple>"jms:topic:STOCK.${in.header.stock} > </simple> > </setHeader> > </splitter> > <recipientList> > <header>queueName</header> > </recipientList> > </route> > </camelContext> > </beans> > > log : > > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> splitter(//price) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{CamelFileLastModified=Mon Oct 20 16:39:16 CEST 2008, > CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, CamelFileLength=437, > CamelFileName=quotes.xml, CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , BodyType:java.io.File , Body:<?xml > version="1.0" encoding="ISO-8859-1"?> > <quotes> > <price stock="MSFT" bid="2.008" offer="2.012" movement="2"/> > <price stock="SUNW" bid="1.034" offer="1.035" movement="2"/> > <price stock="IBMW" bid="2.008" offer="2.012" movement="2"/> > <price stock="BEAS" bid="1.734" offer="1.035" movement="2"/> > <price stock="BEAS" bid="1.734" offer="1.035" movement="2"/> > <price stock="BEAS" bid="1.734" offer="1.035" movement="2"/> > </quotes> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> setHeader(/price/@stock) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > CamelFileName=quotes.xml, CamelFileLength=437, > CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=0, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="2.008" movement="2" offer="2.012" stock="MSFT"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > setHeader("jms:topic:STOCK.${in.header.stock} > ) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > [EMAIL PROTECTED], > CamelFileLength=437, CamelFileName=quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.splitCounter=0, org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="2.008" movement="2" offer="2.012" stock="MSFT"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> setHeader(/price/@stock) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > CamelFileName=quotes.xml, CamelFileLength=437, > CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=1, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.034" movement="2" offer="1.035" stock="SUNW"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > setHeader("jms:topic:STOCK.${in.header.stock} > ) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > [EMAIL PROTECTED], > CamelFileLength=437, CamelFileName=quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.splitCounter=1, org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.034" movement="2" offer="1.035" stock="SUNW"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> setHeader(/price/@stock) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > CamelFileName=quotes.xml, CamelFileLength=437, > CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=2, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="2.008" movement="2" offer="2.012" stock="IBMW"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > setHeader("jms:topic:STOCK.${in.header.stock} > ) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > [EMAIL PROTECTED], > CamelFileLength=437, CamelFileName=quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.splitCounter=2, org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="2.008" movement="2" offer="2.012" stock="IBMW"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> setHeader(/price/@stock) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > CamelFileName=quotes.xml, CamelFileLength=437, > CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=3, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > setHeader("jms:topic:STOCK.${in.header.stock} > ) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > [EMAIL PROTECTED], > CamelFileLength=437, CamelFileName=quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.splitCounter=3, org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> setHeader(/price/@stock) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > CamelFileName=quotes.xml, CamelFileLength=437, > CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=4, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > setHeader("jms:topic:STOCK.${in.header.stock} > ) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > [EMAIL PROTECTED], > CamelFileLength=437, CamelFileName=quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.splitCounter=4, org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> setHeader(/price/@stock) , > Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > CamelFileName=quotes.xml, CamelFileLength=437, > CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=5, CamelFileParent=d:\temp\quotes, > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > setHeader("jms:topic:STOCK.${in.header.stock} > ) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, > [EMAIL PROTECTED], > CamelFileLength=437, CamelFileName=quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > CamelFilePath=d:\temp\quotes\quotes.xml, CamelFileParent=d:\temp\quotes, > org.apache.camel.splitCounter=5, org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > recipientList(${in.header.queueName}) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, > [EMAIL PROTECTED], > CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, CamelFileName=quotes.xml, > CamelFileLength=437, CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=5, CamelFileParent=d:\temp\quotes, > queueName="jms:topic:STOCK.BEAS > , > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger process > INFO: ID-dell-charles/1934-1224580718328/2-0 -> > recipientList(${in.header.queueName}) , Pattern:InOnly , > Properties:{org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 > exclusive valid], > org.apache.camel.file.lock.name=d:\temp\quotes\quotes.xml.camelLock} , > Headers:{org.apache.camel.splitSize=6, CamelFileLastModified=Mon Oct 20 > 16:39:16 CEST 2008, > [EMAIL PROTECTED], > CamelFileAbsolutePath=d:\temp\quotes\quotes.xml, CamelFileName=quotes.xml, > CamelFileLength=437, CamelFilePath=d:\temp\quotes\quotes.xml, > CamelFileCanonicalPath=D:\Temp\quotes\quotes.xml, > org.apache.camel.splitCounter=5, CamelFileParent=d:\temp\quotes, > queueName="jms:topic:STOCK.BEAS > , > org.apache.camel.file.name=quotes.xml} , > BodyType:com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl , > Body:<price bid="1.734" movement="2" offer="1.035" stock="BEAS"/> > org.apache.camel.NoSuchEndpointException: No endpoint could be found for: > "jms:topic:STOCK.BEAS > , please check your classpath contains > the needed camel component jar. > at > org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:54) > at > org.apache.camel.util.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:86) > at > org.apache.camel.processor.RecipientList.resolveEndpoint(RecipientList.java:79) > at > org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:70) > at > org.apache.camel.processor.RecipientList.process(RecipientList.java:59) > at > org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50) > at > org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75) > at > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172) > at > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:90) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63) > at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50) > at > org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50) > at > org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84) > at > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43) > at > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47) > at > org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:153) > at > org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:89) > at > org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:99) > at > org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:65) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66) > at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) > at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown > Source) > at java.util.concurrent.FutureTask.runAndReset(Unknown Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown > Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown > Source) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown > Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown > Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > 21-oct.-2008 11:18:53 org.apache.camel.processor.Logger log > > KR, > > Charles Moulliard > > > janstey wrote: >> >> 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 : >>> <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 : [EMAIL PROTECTED] >>> web site : www.xpectis.com www.xpectis.com >>> My Blog : http://cmoulliard.blogspot.com/ >>> http://cmoulliard.blogspot.com/ >>> >> >> >> > > > ----- > Enterprise Architect > > Xpectis > 12, route d'Esch > L-1470 Luxembourg > > Phone +352 25 10 70 470 > Mobile +352 621 45 36 22 > > e-mail : [EMAIL PROTECTED] > 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---tp20067678s22882p20086157.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/
