You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tarun Kumar <ag...@gmail.com> on 2014/01/08 17:38:10 UTC

camel jms polling

Hi,

I have two routes

<camel:route id="route1">

 <camel:from uri="timer://foo?period=10000"></camel:from>

<camel:bean ref="bean1" method="method1"></camel:bean>

</camel:route>


<camel:route id="route2">

 <camel:from uri="timer://foo?period=10000"></camel:from>

<camel:bean ref="bean2" method="method2"></camel:bean>

</camel:route>


in bean1 and bean2, i poll messages from different JMS queues. When i start
the server, polling consumer in bean1 waits (and blocks) for messages to be
available in jms queue.

Is there any way i can run both routes in parallel?

Re: camel jms polling

Posted by Tarun Kumar <ag...@gmail.com>.
Thanks. That works!


On Thu, Jan 9, 2014 at 1:28 AM, Christian Posta
<ch...@gmail.com>wrote:

> give your timer name something unique for each route:
>
> http://camel.apache.org/timer.html
>
> On Wed, Jan 8, 2014 at 9:11 AM, Tarun Kumar <ag...@gmail.com>
> wrote:
> > Here problem is both routes are running sequentially. I tried with
> >
> > <camel:threadPoolProfile id="defaultThreadPoolProfile"
> >
> >  defaultProfile="true" poolSize="10" maxPoolSize="20" maxQueueSize="1000"
> >
> >  rejectedPolicy="CallerRuns" />
> >
> > as well, doesn't help.
> >
> >
> > On Wed, Jan 8, 2014 at 10:08 PM, Tarun Kumar <agrawal.tarun23@gmail.com
> >wrote:
> >
> >> Hi,
> >>
> >> I have two routes
> >>
> >> <camel:route id="route1">
> >>
> >>  <camel:from uri="timer://foo?period=10000"></camel:from>
> >>
> >> <camel:bean ref="bean1" method="method1"></camel:bean>
> >>
> >> </camel:route>
> >>
> >>
> >> <camel:route id="route2">
> >>
> >>  <camel:from uri="timer://foo?period=10000"></camel:from>
> >>
> >> <camel:bean ref="bean2" method="method2"></camel:bean>
> >>
> >> </camel:route>
> >>
> >>
> >> in bean1 and bean2, i poll messages from different JMS queues. When i
> >> start the server, polling consumer in bean1 waits (and blocks) for
> messages
> >> to be available in jms queue.
> >>
> >> Is there any way i can run both routes in parallel?
> >>
>
>
>
> --
> Christian Posta
> http://www.christianposta.com/blog
> twitter: @christianposta
>

Re: camel jms polling

Posted by Christian Posta <ch...@gmail.com>.
give your timer name something unique for each route:

http://camel.apache.org/timer.html

On Wed, Jan 8, 2014 at 9:11 AM, Tarun Kumar <ag...@gmail.com> wrote:
> Here problem is both routes are running sequentially. I tried with
>
> <camel:threadPoolProfile id="defaultThreadPoolProfile"
>
>  defaultProfile="true" poolSize="10" maxPoolSize="20" maxQueueSize="1000"
>
>  rejectedPolicy="CallerRuns" />
>
> as well, doesn't help.
>
>
> On Wed, Jan 8, 2014 at 10:08 PM, Tarun Kumar <ag...@gmail.com>wrote:
>
>> Hi,
>>
>> I have two routes
>>
>> <camel:route id="route1">
>>
>>  <camel:from uri="timer://foo?period=10000"></camel:from>
>>
>> <camel:bean ref="bean1" method="method1"></camel:bean>
>>
>> </camel:route>
>>
>>
>> <camel:route id="route2">
>>
>>  <camel:from uri="timer://foo?period=10000"></camel:from>
>>
>> <camel:bean ref="bean2" method="method2"></camel:bean>
>>
>> </camel:route>
>>
>>
>> in bean1 and bean2, i poll messages from different JMS queues. When i
>> start the server, polling consumer in bean1 waits (and blocks) for messages
>> to be available in jms queue.
>>
>> Is there any way i can run both routes in parallel?
>>



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Re: camel jms polling

Posted by Tarun Kumar <ag...@gmail.com>.
Here problem is both routes are running sequentially. I tried with

<camel:threadPoolProfile id="defaultThreadPoolProfile"

 defaultProfile="true" poolSize="10" maxPoolSize="20" maxQueueSize="1000"

 rejectedPolicy="CallerRuns" />

as well, doesn't help.


On Wed, Jan 8, 2014 at 10:08 PM, Tarun Kumar <ag...@gmail.com>wrote:

> Hi,
>
> I have two routes
>
> <camel:route id="route1">
>
>  <camel:from uri="timer://foo?period=10000"></camel:from>
>
> <camel:bean ref="bean1" method="method1"></camel:bean>
>
> </camel:route>
>
>
> <camel:route id="route2">
>
>  <camel:from uri="timer://foo?period=10000"></camel:from>
>
> <camel:bean ref="bean2" method="method2"></camel:bean>
>
> </camel:route>
>
>
> in bean1 and bean2, i poll messages from different JMS queues. When i
> start the server, polling consumer in bean1 waits (and blocks) for messages
> to be available in jms queue.
>
> Is there any way i can run both routes in parallel?
>