Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 70904 invoked from network); 11 Mar 2009 17:24:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Mar 2009 17:24:36 -0000 Received: (qmail 10944 invoked by uid 500); 11 Mar 2009 17:24:34 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 10914 invoked by uid 500); 11 Mar 2009 17:24:34 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 10903 invoked by uid 99); 11 Mar 2009 17:24:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2009 10:24:34 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2009 17:24:25 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LhSA0-0004AP-Du for users@activemq.apache.org; Wed, 11 Mar 2009 10:24:04 -0700 Message-ID: <22460136.post@talk.nabble.com> Date: Wed, 11 Mar 2009 10:24:04 -0700 (PDT) From: pclovec To: users@activemq.apache.org Subject: Re: Fast producers,slow consumer... queue growing forever In-Reply-To: <22373306.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: pclovec@gmail.com References: <22373306.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Make met same problem Yenki wrote: >=20 > Hi, for the last few days I=E2=80=99ve been trying to solve a fast produc= ers / > slow consumer problem. I want a limited amount of messages fetch on the > consumer (this works) but I also want to have a limited amount of message= s > in the queue itself (doesn=E2=80=99t work). I use ActiveMQ 4.1.2 Here is = what I > tried: >=20 > #1 Setup destinations policies > I added this to my activemq.xml >=20 > > > "> > > > > =09 > =09 > > > > >=20 > How can I know if my policies are applied? They don=E2=80=99t seem to be = because > when I run my application my queue is growing until out of memory. What I > see from JMX=E2=80=A6 > -QueueSize of my queue growing forever (with prefetch of 20 & pending > limit of 10 I would expect a max of 30 right?) > -MaximumPendingMessageLimit=3D0 for the non-durable subscription to this > queue >=20 >=20 > #2 Queue configurations > I tried to set MaximumPendingMessageLimit when I create the queue. > mySession.createQueue(=E2=80=9CMyQueue=E2=80=9D + > "?consumer.prefetchSize=3D20&consumer.maximumPendingMessageLimit=3D10"); >=20 > What I see from JMX=E2=80=A6 > -QueueSize of my queue growing forever > -The value for the non-durable subscription to this queue are: > MaximumPendingMessageLimit=3D10=20 > PrefetchSize=3D20 >=20 > #3 Memory limit > As a last resort I tried to set a memory limit on my policyEntry and on m= y > broker and it is still growing forever. > From JMX I see the MemoryPercentageUsed always to 0 for both broker and > Queue. I run Broken embedded in the same VM than my application. Maybe it > can explain why. >=20 > Could someone help me make my PendingMessageLimit works so I don=E2=80=99= t run out > of memory. > Thanks for your help >=20 > Yannick >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/Fast-producers%2Cslow-c= onsumer...-queue-growing-forever-tp22373306p22460136.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.