activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Setting prefetch size and validating in JMX console ...
Date Fri, 17 Sep 2010 15:01:22 GMT
On Fri, 2010-09-17 at 10:09 -0400, Parrish, Ken wrote:
> I am having difficulty adjusting prefetch size for an ActiveMQ client.
> 
> OS:
> Windows NT Pro
> 
> Server:
> ActiveMQ:  5.3.2  hosted as a Windows console application
> JRE:  1.6.0.20
> JMX:  JConsole 1.6.0.20-b02
> 
> Client:
> Apache NMS client library
> .NET 3.5 console application
> 
> I am setting the prefetch size for the client as part of the ActiveMQ queue URL, as such:
> 
> tcp://localhost:61616?consumer.prefetchSize=0

To set the prefetch globally in NMS.ActiveMQ then you would use a URI
simillar to this.

tcp://localhost:61616?nms.prefetchPolicy.topicPrefetch=1

The prefetchPolicy options are

        private int queuePrefetch;
        private int queueBrowserPrefetch;
        private int topicPrefetch;
        private int durableTopicPrefetch;
        private int maximumPendingMessageLimit;

> 
> I start up my client which connects to the queue via an NMS IMessageConsumer.Recieve
method call.
> 
> Looking in JConsole, I can see my queue connection in:
> 
> org.apache.activemq/localhost/Subscription/NonDurable/Queue/[queuename]/[connectionID]/[connectionName]/Attributes
> 
> In the attribute list, PrefetchSize remains at 1000.
> 
> How can I confirm that my client is in fact connecting with prefetchSize = 0 ?  Is the
method for setting the connection prefetchSize not  correct?
> 
> Thanks in advance for any help.
> 
> Ken Parrish
> Gomez, Inc.
> 

-- 
Tim Bish

Open Source Integration: http://fusesource.com

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/


Mime
View raw message