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: slow consumer.. not working
Date Fri, 28 Jul 2006 07:30:37 GMT
Are you publishing quickly? Do you have fast consumers as well?

On 7/27/06, shital <shitalbpatel@optonline.net> wrote:
>
> I have requirement where i need to throw away some messages because consumer
> is not able to keep up.
>
> i am using activeMQ 4.1. i modified the destinationPolicy as follows ..
> (this is just test so i have limit 1)
>
> <destinationPolicy>
>       <policyMap><policyEntries>
>
>           <policyEntry topic=">">
>             <messageEvictionStrategy>
>               <oldestMessageEvictionStrategy />
>             </messageEvictionStrategy>
>             <pendingMessageLimitStrategy>
>               <constantPendingMessageLimitStrategy limit="1"/>
>             </pendingMessageLimitStrategy>
>           </policyEntry>
>       </policyEntries></policyMap>
>     </destinationPolicy>
>
> and in the consumer i am setting prefetch size as follows.. again for test i
> have limit 1
>
> ActiveMQPrefetchPolicy policy = new ActiveMQPrefetchPolicy();
>             policy.setMaximumPendingMessageLimit(1);
>             policy.setTopicPrefetch(5);
>
>             connectionFactory.setPrefetchPolicy(policy);
>
> then i run the sample program (which i wrote).. i have some Thread.sleep(..)
> in onMessage(..) so make consumer slow in my test program, but looks like
> its not dropping any messages. slowly slowly but consumer gets all messages
> ??
>
> what am i doing wrong here ??
>
> Please Help...
> --
> View this message in context: http://www.nabble.com/slow-consumer..-not-working-tf2011021.html#a5525918
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

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

Mime
View raw message