You are doing a Static Recipient List (http://activemq.apache.org/camel/recipient-list.html) so your Spring DSL should look like:

 <route>
   <from uri="jms:numbers"/>
   <to uri="jms:Queue1"/>
   <to uri="jms:Queue2"/>
   <to uri="jms:Queue3"/>
 </route>

selezovikj wrote:
I want to route a message from a queue "numbers" to three queues. I want all
three queues to receive the very same message, so that later each queue can
send the message to a corresponding bean. I did the route in Camel DSL. My question is how would I configure the following route written in the Camel DSL to a route in Spring:
from("jms:numbers").to("jms:queue:Queue1", "jms:queue:Queue2",
"jms:queue:Queue3");
from("jms:queue:andysQueue3").to("bean:multiplier2");
------------------------------------------------------------------------------------------------------
Possible Spring configurations:
1:
<camelContext id="camel"
                xmlns="http://activemq.apache.org/camel/schema/spring";>
                <route>
                        <from uri="jms:numbers"/>
                        <to uri="jms:Queue1", "jms:Queue2", "jms:Queue3"/>
                </route>
</camelContext>

2:
<camelContext id="camel"
                xmlns="http://activemq.apache.org/camel/schema/spring";>
                <route>
                        <from uri="jms:numbers"/>
                        <to uri="jms:Queue1"/>
                </route>
                <route>
                        <from uri="jms:numbers"/>
                        <to uri="jms:Queue2"/>
                </route>
                <route>
                        <from uri="jms:numbers"/>
                        <to uri="jms:Queue3"/>
                </route>
</camelContext>

3: Create three separate camelContexts, each one containing a route.

Reply via email to