You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Li Li <fa...@gmail.com> on 2014/01/07 10:55:22 UTC

how to set queue's max size?

I am using activemq to implement the producer and consumer model. the
producer simply dispatch jobs to queue and consumer do the hard job.
How can I config the queue's max size? That is, if size of message not
consumed exceed this value, then producer will be blocked(or faied
with some exception in async send)

Re: how to set queue's max size?

Posted by Christian Posta <ch...@gmail.com>.
your best bet is to use producer flow control and memory settings:

http://activemq.apache.org/producer-flow-control.html

There isn't a way to limit the # of messages in a queue per-se.

On Tue, Jan 7, 2014 at 1:55 AM, Li Li <fa...@gmail.com> wrote:
> I am using activemq to implement the producer and consumer model. the
> producer simply dispatch jobs to queue and consumer do the hard job.
> How can I config the queue's max size? That is, if size of message not
> consumed exceed this value, then producer will be blocked(or faied
> with some exception in async send)



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta