activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher G. Stach II" <...@ldsys.net>
Subject Re: Can't set prefetch size!
Date Fri, 02 Feb 2007 13:57:10 GMT
magic.moose wrote:
> 
> I tried that. Resource Adapter simply references connectionFactory:
> 	<bean id="broker"
> 		class="org.apache.activemq.xbean.BrokerFactoryBean"
> depends-on="serverConnector">
> 		<property name="config"
> 			value="classpath:broker.xml" />
> 		<property name="start" value="true" />
> 	</bean>
> 	<bean id="connectionFactory"
> 		class="org.apache.activemq.ActiveMQConnectionFactory"
> 		singleton="true">
> 		<property name="brokerURL" value="vm://localhost"/>
> 	</bean>
> 
> 	<bean id="jmsResourceAdapter"
> 		class="org.apache.activemq.ra.ActiveMQResourceAdapter">
> 		<property name="connectionFactory" ref="connectionFactory" />
> 	</bean>
> 
> where broker.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <beans xmlns="http://activemq.org/config/1.0">
> 
> 	<broker name="localhost" persistent="false" useJmx="true">
> 	
> 		<transportConnectors>
> 			<transportConnector
> 				uri="vm://localhost" />
> 		</transportConnectors>
> 		<memoryManager>
> 			<usageManager id="memory-manager" limit="20 MB" />
> 		</memoryManager>
> 
> 	    <destinationPolicy>
> 	      <policyMap><policyEntries>
>           <policyEntry queue="testQueue">
>             <dispatchPolicy>
>               <roundRobinDispatchPolicy/>
>             </dispatchPolicy>
>             <pendingMessageLimitStrategy>
>             	<constantPendingMessageLimitStrategy limit="0"/>
>             </pendingMessageLimitStrategy>
>           </policyEntry>
>       </policyEntries></policyMap>
>     </destinationPolicy>
>     
> 	</broker>
> 
> </beans>
> 
> queuePrefetch property of resource adapter doesnt help.
> and it really is 10 ! 
> it not only that it behaves like it is 10. thats what i can see via jmx.

Try this:

 	<bean id="connectionFactory"
 		class="org.apache.activemq.ActiveMQConnectionFactory"
 		singleton="true">
		<property name="brokerURL"
value="vm://localhost?jms.redeliveryPolicy.allPrefetchValues=1"/>
 	</bean>


-- 
Christopher G. Stach II


Mime
View raw message