Thank you very much for your replies. Now i am able to set the prefetch attribute.
The problem was, i was trying to set it from the server side but actually it must be set in client/consumer side. I downloaded the STOMP AS3 source code and found the following way to set it. var header:SubscribeHeaders = new SubscribeHeaders(); header.amqPrefetchSize="0"; header.amqDispatchAsync="true"; header.amqMaximumPendingMessageLimit="50"; Stomp.connect(serverName, 8084); Stomp.subscribe(destination,header); thank you. Gary Tully wrote: > > there are prefetch attributes in the PolicyEntry that goes in > destinationPolicy. It is only in effect if the no consumer override is > specified. > What you want is topicPrefetch. > <policyEntry topic=">" topicPrefetch="100" /> > > See all the attributes of PolicyEntry in the src: > http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java?view=markup > > > > 2009/11/17 SelvarajAM <selvara...@hcl.in> > >> >> Thanks for your reply. >> I did use stomp extensions but still unable to set the prefetch size. >> >> Below is the code i used. >> >> connection = new StompConnection(); >> connection.open("0.0.0.0", 8084); >> connection.connect("test", "test"); >> >> HashMap<String, String> header = new HashMap<String, String>(); >> header.put("activemq.prefetchSize", "100"); >> >> connection.send("/topic/a", message,null,header); >> >> >> Is there any attribute for prefetch in <destinationPolicy> >> configuartion?? >> >> Appreciate your help. >> >> >> >> Dejan Bosanac wrote: >> > >> > Hi, >> > >> > try setting prefetch size on your consumer using activemq.prefetchSize >> > header. See >> > >> http://activemq.apache.org/stomp.html#Stomp-ActiveMQextensionstoStompfor >> > more details >> > >> > Cheers >> > -- >> > Dejan Bosanac - http://twitter.com/dejanb >> > >> > Open Source Integration - http://fusesource.com/ >> > ActiveMQ in Action - http://www.manning.com/snyder/ >> > Blog - http://www.nighttale.net >> > >> > >> > On Tue, Nov 17, 2009 at 1:12 PM, SelvarajAM <selvara...@hcl.in> wrote: >> > >> >> >> >> I am using Activemq 5.3, Flex Client and stomp protocol for >> >> communication. >> >> >> >> I send Non-Persisent messages to Non-Durable topic. >> >> >> >> I want to change the PrefetchSize of the Subscribers/Consumers. >> JConsole >> >> shows the PrefetchSize as 1000 always, though the document says the >> >> default >> >> value as Short.MAX_VALUE -1 >> >> >> >> I have also tried all the configuration mentioned in the below link, >> but >> >> didnt help. >> >> http://activemq.apache.org/what-is-the-prefetch-limit-for.html >> >> >> >> My XML configuration is as follows >> >> >> >> <beans >> >> xmlns="http://www.springframework.org/schema/beans" >> >> xmlns:amq="http://activemq.apache.org/schema/core" >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> >> xsi:schemaLocation="http://www.springframework.org/schema/beans >> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >> >> http://activemq.apache.org/schema/core >> >> http://activemq.apache.org/schema/core/activemq-core.xsd"> >> >> >> >> <broker xmlns="http://activemq.apache.org/schema/core" >> persistent="false" >> >> useJmx="true" brokerName="PRI" > >> >> <transportConnectors> >> >> <transportConnector name="StompNio" >> >> uri="stomp://0.0.0.0:8084?consumer.prefetchSize=1015"/> >> >> <transportConnector name="Nio" >> >> uri="nio://0.0.0.0:8086?consumer.prefetchSize=1015"/> >> >> <transportConnector name="Tcp" >> >> uri="tcp://0.0.0.0:8087?consumer.prefetchSize=1015"/> >> >> </transportConnectors> >> >> </broker> >> >> </beans> >> >> >> >> Kindly help on this. >> >> >> >> Jconsole screen shot is attached >> >> http://old.nabble.com/file/p26388916/Prefetch.jpg >> >> -- >> >> View this message in context: >> >> >> http://old.nabble.com/PrefetchSize-of-Non-Durable-topic-not-able-to-change-tp26388916p26388916.html >> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> >> >> >> > >> > >> > ----- >> > Dejan Bosanac >> > >> > Open Source Integration - http://fusesource.com/ >> > ActiveMQ in Action - http://www.manning.com/snyder/ >> > Blog - http://www.nighttale.net >> > >> >> -- >> View this message in context: >> http://old.nabble.com/PrefetchSize-of-Non-Durable-topic-not-able-to-change-tp26388916p26392358.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > http://blog.garytully.com > > Open Source Integration > http://fusesource.com > > -- View this message in context: http://old.nabble.com/PrefetchSize-of-Non-Durable-topic-not-able-to-change-tp26388916p26404694.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.