activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: block on threshold
Date Fri, 09 Aug 2013 19:27:27 GMT
Producer Flow Control is implemented based on message size limits, not
message counts. So you could calculate an approximate message size from the
expected number of messages you wish to have as a backlog, and set the
configurations like that.

So if you have 10,000 1K messages, you can set your queue to have a memory
limit of ~ 9.76MB

You will have to play around with it a bit because the actual message size
includes headers, and other JMS stuff, so it won't be 100% exact.

Hope that helps

On Fri, Aug 9, 2013 at 7:48 AM, Jamie <> wrote:

> Hi All
> Greetings! Does anyone have any idea on how to implement producer blocking
> in ActiveMQ when the no. of queued messages gets to a certain threshold?
> I've read about Active MQ's flow control feature, but I am still confused
> on how one would accomplish this. In short, when the number of messages
> gets to say 10,000 messages, I wish for the producers to block. I am using
> ActiveMQ in embedded mode, so any clues from an API perspective would be
> most appreciated.
> Much appreciate your guidance
> Thanks
> Jamie

*Christian Posta*
twitter: @christianposta

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