On 12/23/10 12:39 PM, Michael La Budde wrote:

I have a question regarding the route syntax to use if I need to use more than 
one instance of the ActiveMQComponent.

Here is my spring config file that I hope will work:

     <bean id="activemq-out" 
class="org.apache.activemq.camel.component.ActiveMQComponent">
         <property name="configuration" ref="jmsConfig"/>
     </bean>


     <bean id="activemq-in" 
class="org.apache.activemq.camel.component.ActiveMQComponent">
         <property name="brokerURL">
             <value>tcp://10.0.0.25:61616?jms.prefectPolicy=1</value>
         </property>
     </bean>

The "activemq-out" bean would only be used to publish messages - to take 
advantage of pooling.
The "activemq-in" bean would only be used to listen for messages.

So, would this be the correct route specification?

<route>

     <from uri="activemq-in:MyCompany.Incoming?concurrentConsumers=5"/>

     <to uri="bean:myBean"/>


</route>




<route>

     <from uri="direct:bean:MyPublisher"/>



     <to uri="activemq-out:MyCompany.VitalMessage"/>


</route>


This route configure looks good to me.




I should probably ask this in a separate post, but here goes:

I would like to be able to take advantage of setting DestinationOptions using 
ActiveMQ. Here is an example from their website:


Example


queue = new 
ActiveMQQueue("TEST.QUEUE?consumer.dispatchAsync=false&consumer.prefetchSize=10");
consumer = session.createConsumer(queue);


Is there a way using Camel to pass this through to ActiveMQ?

No, I don't think current camel-activemq component support the DestinationOptions of the ActiveMQ. You can find camel-activemq supports options here[1]

[1]http://camel.apache.org/jms.html#JMS-Options

TIA,

Mike L. (aka patzerbud)

                                        


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to