activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <>
Subject Re: How to "activate" an interceptor
Date Tue, 24 Nov 2009 16:42:29 GMT
On Tue, Nov 24, 2009 at 3:16 AM, moreno9000 <> wrote:
> Yes,
> I want to discard sent messages if number of pending messages
> exceed a predefined limit.
> The reasons for this choice are:
> AMQ side: I'd like to prevent problems due to a queue with
> a high number of pending messages. In 5.1 release I saw that
> consumers stop receving messages from a queue with too
> many messages previously not consumed. This doesn't happen
> in 5.3, but in 5.3 I wasn't able to advice a producer that it was
> filling the queue so...
> Client side: I'd like to raise an exception to producer in order
> to say it "Please, stop sending messages till messages are read
> by a consumer".

This sounds similar to the way that producer flow control works:

The difference is in the predicate you're using. Instead of keying on
the amount of memory available, you're keying on the number of
messages currently in the destination.  You'll  need to do much more
than just a BrokerFilter to achieve this behavior.

perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"

ActiveMQ in Action:

View raw message