activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Mazniker <>
Subject prefetchSize keeps growing
Date Fri, 29 Feb 2008 00:06:39 GMT


We have a situation with a slow consumer and a fast producer for non-durable
topic. I'm running a test when the producer sends more messages than the
consumer can consume. I want extra messages to be discarded, so I set up
pendingMessageLimitStrategy (limit set to 10) and prefetchPolicy on the
consumer with prefetch set to 10. When I run the test, I see that
prefetchSize on the JMX MBean starts with 10, but keeps growing, and the
discarded number is much smaller than it should be if the prefetch size
stayed at 10. After some time it ends with the subscriber running out of
I'm not sure why prefetch policy is not working as documented and is not
limiting the number of messages on the client's side. How can I limit the
number of messages on the client side and discard the rest?
I'm using Active MQ 5.0. 

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message