activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: ActiveMQ slow consumer policy
Date Wed, 19 Dec 2012 13:33:19 GMT
1000 topics with a prefetch of 100 is 100,000 pending messages in memory.

To get real eager discarding try:

<policyEntry topic=">" topicPrefetch="1" >
                    <subscriptionRecoveryPolicy>
                        <lastImageSubscriptionRecoveryPolicy/>
                    </subscriptionRecoveryPolicy>
                    <pendingMessageLimitStrategy>
                        <constantPendingMessageLimitStrategy limit="0"/>
                    </pendingMessageLimitStrategy>
...

so that it won't keep any messages pending when the consumer is not ready
to consume. this will reduce the dispatch work load on the topic and ensure
fast consumer get all messages while slow consumers get gaps.

The lastImageSubscriptionRecoveryPolicy is only for retroactive
returning/new consumers, the get the current last state when the connect.



On 19 December 2012 12:55, benj <apache.org@benandi.com> wrote:

> Hi
>
> Thanks for the suggestion of using topicPrefetch.
>
> Unfortunately it doesn't seem to have any effect, I still get a large queue
> building up in the broker.
> I also getting the following message: "Producers will be throttled to the
> rate at which messages are removed from this destination"
>
> Instead of throttling the producer, I want the broker to discard messages
> in
> the queue so that only the last message on each topic is retained.
>
> I'm sure this is just me not understanding how to configure activemq
> properly...
> So any further suggestions much appreciated...!
>
> Thanks again,
>
> Ben
>
>
> From: gtully [via ActiveMQ]
> [mailto:ml-node+s2283324n4660887h22@n4.nabble.com]
> Sent: 19 December 2012 11:53
> To: benj
> Subject: Re: ActiveMQ slow consumer policy
>
> > configure a lower prefetch value for your topic consumers b/c the
> > discarding only takes place once the prefetch limit has been reached and
> > the default value is quite high.
> >
> > so something like <policyEntry topic=">" topicPrefetch=100 ...>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-slow-consumer-policy-tp4660859p4660888.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://redhat.com
http://blog.garytully.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message