Use the concurrentConsumers option on the JMS endpoint to have have more threads consuming messages from the JMS queues
<from uri="activemq:cs.input?concurrentConsumers=5" /> <inOut uri="activemq:cs.delayer" /> .... On Tue, Feb 9, 2010 at 3:03 PM, Muhammad Ichsan <[email protected]> wrote: > Dear All > > I've been searching about how to use threads in Camel. But I found > nothing which answer my problem. This is one of my routes: > > <route> > <from uri="activemq:cs.input" /> > <threads poolSize="5"/> > <inOut uri="activemq:cs.delayer" /> > <to uri="bean:consolePrinter?method=print" /> > <to uri="bean:textListener?method=putResultBack" /> > </route>. > > > As I put <threads> there I got this warning: > > [aultMessageListenerContainer-1] JmsBinding WARN > Cannot determine specific JmsMessage type to use from body class. Will > use generic JmsMessage. Body class: > java.util.concurrent.ScheduledThreadPoolExecutor.ScheduledFutureTask. > If you want to send a POJO then your class might need to implement > java.io.Serializable, or you can force a specific type by setting the > jmsMessageType option on the JMS endpoint. > > And my code doesn't work anymore. > > How to use threads then? I want to make more messages processed more > in limited time. > > Thanks > > -- > ~The best men are men who benefit to others > http://michsan.web.id > > Yang berkualitas memang beda rasanya! > http://rizqi-cookies.com > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
