activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Can't set prefetch size!
Date Tue, 06 Feb 2007 13:34:27 GMT
Incidentally in another thread someone spotted a bug that was
affecting the setting of custom consumer configurations in the RA, so
the latest 4.2-SNAPSHOT could help your issue

On 2/5/07, magic.moose <maciek@avedya.com> wrote:
>
> Yes, I just wanted to show config w/o prefetch stuff.
> Anyway, setting vm://localhost?jms.prefetchPolicy.all, or policies for
> queues, or for particular consumer via URL it all failed.
> So did setting of resource adapter properties according to
> http://activemq.apache.org/resource-adapter-properties.html.
> Weird thing is that 'default value' is 1000, well, at least in docs. Ive
> never ever seen 1000 while playing with 4.1 and jvm transport. Always 10.
>
> I havent tried to force it in code. I really dont want to go that way
> though.
>
> In fact there is no more config I use. Well activationSpec, maybe, for some
> consumer props. It works on default settings though...
>
> Maciek
>
>
> James.Strachan wrote:
> >
> > On 2/2/07, magic.moose <maciek@avedya.com> wrote:
> >>
> >>
> >> I tried that. Resource Adapter simply references connectionFactory:
> >
> > I'm confused - I don't see any attempt to set the prefetch policy in
> > your XML? If you are explicitly creating a connectionFactory and
> > passing it into the RA you could try configure that?
> >
> > James
> >
> >
> >>         <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.
> >>
> >>
> >> About lost messages. Yup, I applied  AMQ-1078 to 4.1 and problem
> >> disappeared.
> >>
> >>
> >> James.Strachan wrote:
> >> >
> >> > On 1/25/07, magic.moose <maciek@avedya.com> wrote:
> >> >>
> >> >> Hi.
> >> >>
> >> >> AMQ4.1.0, Jencks, Spring 1.2.7.
> >> >>
> >> >> Prefetch size for all queues is always 10. I tried to CHANGE it in
> >> many
> >> >> places:
> >> >> - in broker url (both in conf xml and embedded into
> >> connectionFactory).
> >> >> - in activationSpec destination name.
> >> >> - in xml config <queue> (name || physicalName ??).
> >> >>
> >> >> It stays 10...
> >> >
> >> > The default is 1000 BTW.
> >> >
> >> >
> >> http://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
> >> >
> >> >
> >> >> Broker is embedded, jvm. no persistance. Is there any other place?
> >> >> something
> >> >> overides my settings? Its crazy. such a simple thing to do and takes
> >> >> ages...
> >> >
> >> > Given that you're using Jencks and so JCA, it should be the Resource
> >> > Adapter settings
> >> > http://activemq.apache.org/resource-adapter-properties.html
> >> >
> >> >
> >> >> BTW: I want to play with that setting to deal with very slow
> >> consumers.
> >> >> Im
> >> >> loosing some messages (or rather they are stuck in the queue) when
I
> >> bulk
> >> >> send them.
> >> >
> >> > FWIW this has been fixed in 4.2 if you wanna try that
> >> >
> >> > --
> >> >
> >> > James
> >> > -------
> >> > http://radio.weblogs.com/0112098/
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Can%27t-set-prefetch-size%21-tf3114996.html#a8763926
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Can%27t-set-prefetch-size%21-tf3114996.html#a8802895
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message