activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Pesochinsky <>
Subject Re: Trouble with prefetch buffer.
Date Thu, 03 Aug 2006 00:08:31 GMT

Thanks a lot to both of you. Now I understand the issue, but I still need
prefetchSize=0 to fix it. 

I have ~20 servers doing the same type of work, but in deferent contexts.
Some jobs are running for days or weeks, others are executed weekly and run
a few hours, and there are real-time user requests. To  implement this jobs
are split into small 1 sec - 5 min jobs and sent to different queues for
different types of jobs, e.g:

   FIN.Q1,  FIN.Q2, FIN.Q3

Servers are configured to check different queues. E.g. n servers check
FIN.Q1 first, if no jobs, they go to FIN.Q2; m servers check FIN.Q2 first
and FIN.Q1 next; others check only one queue. When I check the queue I do
receiveNoWait(), if no jobs found on any of the queues I do recieve(
sleepTime ) on "FIN.>" queue. By changing number of servers configured one
way or the other I make sure that performance requirements are met. With
this setup some consumers are idle for some time and they hold some jobs.
This means that real-time job can be sitting in prefetch buffer for a long

I am wondering how 'common' is this problem. Maybe there is some more
elegant solution, e.g. to allow external or very configurable (script like)
dispatch policy. Anyway, for now I need to fix prefetchSize. I searched the
code for prefetchSize, but I cannot find where it makes sure that 0 value is
ignored. Thanks again.
View this message in context:
Sent from the ActiveMQ - User forum at

View raw message