You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Yenki <ya...@gmail.com> on 2009/03/06 15:16:49 UTC

Fast producers,slow consumer... queue growing forever

Hi, for the last few days I’ve been trying to solve a fast producers / 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 messages in the
queue itself (doesn’t work). I use ActiveMQ 4.1.2 Here is what I tried:

#1 Setup destinations policies
I added this to my activemq.xml

    <destinationPolicy>
      <policyMap><policyEntries>
          <policyEntry queue=">">
            <pendingMessageLimitStrategy>
              <constantPendingMessageLimitStrategy limit="10"/>
            </pendingMessageLimitStrategy>
	    <messageEvictionStrategy>
	      <oldestMessageEvictionStrategy/>
            </messageEvictionStrategy >
          </policyEntry>
      </policyEntries></policyMap>
    </destinationPolicy>

How can I know if my policies are applied? They don’t seem to be because
when I run my application my queue is growing until out of memory. What I
see from JMX…
-QueueSize of my queue growing forever (with prefetch of 20 & pending limit
of 10 I would expect a max of 30 right?)
-MaximumPendingMessageLimit=0 for the non-durable subscription to this queue


#2 Queue configurations
I tried to set MaximumPendingMessageLimit when I create the queue.
mySession.createQueue(“MyQueue” +
"?consumer.prefetchSize=20&consumer.maximumPendingMessageLimit=10");

What I see from JMX…
-QueueSize of my queue growing forever
-The value for the non-durable subscription to this queue are:
      MaximumPendingMessageLimit=10 
      PrefetchSize=20

#3 Memory limit
As a last resort I tried to set a memory limit on my policyEntry and on my
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.

Could someone help me make my PendingMessageLimit works so I don’t run out
of memory.
Thanks for your help

Yannick


-- 
View this message in context: http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22373306.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Fast producers,slow consumer... queue growing forever

Posted by Yenki <ya...@gmail.com>.
Ok I will. By that time maybe you want to take a look at this post where I
explained the problem in more details. 
http://www.nabble.com/Possible-defect-in-Message-Eviction-to22415827.html
http://www.nabble.com/Possible-defect-in-Message-Eviction-to22415827.html 

Yannick


Andreas Gies-3 wrote:
> 
> Hi,
> 
> I am glad the answer helped a bit. It would be great if you could turn  
> your test app into a JUnit test and log a JIRA for your issue.
> 
> Best regards
> Andreas
> 
> On Mar 11, 2009, at 9:27 PM, Yenki wrote:
> 
>>
>> Hi Andreas,
>>
>> thanks for your help! We also managed to make memory limit work on  
>> 5.2. But
>> we still have problemes with message eviction. I'v create a small
>> application to test it while stepping in ActiveMQ code. What I found  
>> is that
>> one evicted message out of two is redirected to the client. I'm almost
>> convinced there is a bug there.
>> does Anybody have the same problem?
>>
>> Yannick
>>
>> Andreas Gies-3 wrote:
>>>
>>> Hi there,
>>>
>>> I have run into a similar issue with a later version of ActiveMQ and
>>> have blogged about that.
>>> Perhaps that helps you:
>>> http://open-source-adventures.blogspot.com/2009/01/limiting-disk-store-usage-with-active.html
>>>
>>> Best regards
>>> Andreas
>>>
>>> On Mar 11, 2009, at 6:24 PM, pclovec wrote:
>>>
>>>>
>>>> Make met same problem
>>>>
>>>> Yenki wrote:
>>>>>
>>>>> Hi, for the last few days I’ve been trying to solve a fast
>>>>> producers /
>>>>> 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
>>>>> messages
>>>>> in the queue itself (doesn’t work). I use ActiveMQ 4.1.2 Here is
>>>>> what I
>>>>> tried:
>>>>>
>>>>> #1 Setup destinations policies
>>>>> I added this to my activemq.xml
>>>>>
>>>>>   <destinationPolicy>
>>>>>     <policyMap><policyEntries>
>>>>>         <policyEntry queue=">">
>>>>>           <pendingMessageLimitStrategy>
>>>>>             <constantPendingMessageLimitStrategy limit="10"/>
>>>>>           </pendingMessageLimitStrategy>
>>>>> 	    <messageEvictionStrategy>
>>>>> 	      <oldestMessageEvictionStrategy/>
>>>>>           </messageEvictionStrategy >
>>>>>         </policyEntry>
>>>>>     </policyEntries></policyMap>
>>>>>   </destinationPolicy>
>>>>>
>>>>> How can I know if my policies are applied? They don’t seem to be
>>>>> because
>>>>> when I run my application my queue is growing until out of memory.
>>>>> What I
>>>>> see from JMX…
>>>>> -QueueSize of my queue growing forever (with prefetch of 20 &  
>>>>> pending
>>>>> limit of 10 I would expect a max of 30 right?)
>>>>> -MaximumPendingMessageLimit=0 for the non-durable subscription to
>>>>> this
>>>>> queue
>>>>>
>>>>>
>>>>> #2 Queue configurations
>>>>> I tried to set MaximumPendingMessageLimit when I create the queue.
>>>>> mySession.createQueue(“MyQueue” +
>>>>> "? 
>>>>> consumer.prefetchSize=20&consumer.maximumPendingMessageLimit=10");
>>>>>
>>>>> What I see from JMX…
>>>>> -QueueSize of my queue growing forever
>>>>> -The value for the non-durable subscription to this queue are:
>>>>>     MaximumPendingMessageLimit=10
>>>>>     PrefetchSize=20
>>>>>
>>>>> #3 Memory limit
>>>>> As a last resort I tried to set a memory limit on my policyEntry
>>>>> and on my
>>>>> 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.
>>>>>
>>>>> Could someone help me make my PendingMessageLimit works so I don’t
>>>>> run out
>>>>> of memory.
>>>>> Thanks for your help
>>>>>
>>>>> Yannick
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22460136.html
>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>>
>>>
>>> ---
>>> Mit freundlichen Grüssen - Kind Regards
>>> Andreas Gies
>>> Principal Consultant
>>> Open Source Center of Competence
>>>
>>> Progress Software GmbH
>>> Agrippinawerft 26
>>> 50678 Köln
>>>
>>> E-Mail      	agies@progress.com
>>> Direct Line 	+49 (0)9953 980349
>>> Mobile      	+49 (0)170 5759611
>>> Skype        	+44 (0)20 3239 2922
>>> Skype       	+353 (0)1 443 4971
>>> Skype       	+1 (0)781 262 0168
>>>
>>> http://www.progress.com
>>> http://fusesource.com
>>> http://open-source-adventures.blogspot.com
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> Progress Software GmbH
>>> Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
>>> Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
>>> Amtsgericht Koeln, HRB 15620;
>>> Geschaeftsfuehrung: David Ireland
>>> -------------------------------------------------------
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22463774.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> ---
> Mit freundlichen Grüssen - Kind Regards
> Andreas Gies
> Principal Consultant
> Open Source Center of Competence
> 
> Progress Software GmbH
> Agrippinawerft 26
> 50678 Köln
> 
> E-Mail      	agies@progress.com
> Direct Line 	+49 (0)9953 980349
> Mobile      	+49 (0)170 5759611
> Skype        	+44 (0)20 3239 2922
> Skype       	+353 (0)1 443 4971
> Skype       	+1 (0)781 262 0168
> 
> http://www.progress.com
> http://fusesource.com
> http://open-source-adventures.blogspot.com
> 
> 
> 
> -------------------------------------------------------
> Progress Software GmbH
> Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
> Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
> Amtsgericht Koeln, HRB 15620;
> Geschaeftsfuehrung: David Ireland
> -------------------------------------------------------
> 
> 

-- 
View this message in context: http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22473176.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Fast producers,slow consumer... queue growing forever

Posted by Andreas Gies <ag...@progress.com>.
Hi,

I am glad the answer helped a bit. It would be great if you could turn  
your test app into a JUnit test and log a JIRA for your issue.

Best regards
Andreas

On Mar 11, 2009, at 9:27 PM, Yenki wrote:

>
> Hi Andreas,
>
> thanks for your help! We also managed to make memory limit work on  
> 5.2. But
> we still have problemes with message eviction. I'v create a small
> application to test it while stepping in ActiveMQ code. What I found  
> is that
> one evicted message out of two is redirected to the client. I'm almost
> convinced there is a bug there.
> does Anybody have the same problem?
>
> Yannick
>
> Andreas Gies-3 wrote:
>>
>> Hi there,
>>
>> I have run into a similar issue with a later version of ActiveMQ and
>> have blogged about that.
>> Perhaps that helps you:
>> http://open-source-adventures.blogspot.com/2009/01/limiting-disk-store-usage-with-active.html
>>
>> Best regards
>> Andreas
>>
>> On Mar 11, 2009, at 6:24 PM, pclovec wrote:
>>
>>>
>>> Make met same problem
>>>
>>> Yenki wrote:
>>>>
>>>> Hi, for the last few days I’ve been trying to solve a fast
>>>> producers /
>>>> 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
>>>> messages
>>>> in the queue itself (doesn’t work). I use ActiveMQ 4.1.2 Here is
>>>> what I
>>>> tried:
>>>>
>>>> #1 Setup destinations policies
>>>> I added this to my activemq.xml
>>>>
>>>>   <destinationPolicy>
>>>>     <policyMap><policyEntries>
>>>>         <policyEntry queue=">">
>>>>           <pendingMessageLimitStrategy>
>>>>             <constantPendingMessageLimitStrategy limit="10"/>
>>>>           </pendingMessageLimitStrategy>
>>>> 	    <messageEvictionStrategy>
>>>> 	      <oldestMessageEvictionStrategy/>
>>>>           </messageEvictionStrategy >
>>>>         </policyEntry>
>>>>     </policyEntries></policyMap>
>>>>   </destinationPolicy>
>>>>
>>>> How can I know if my policies are applied? They don’t seem to be
>>>> because
>>>> when I run my application my queue is growing until out of memory.
>>>> What I
>>>> see from JMX…
>>>> -QueueSize of my queue growing forever (with prefetch of 20 &  
>>>> pending
>>>> limit of 10 I would expect a max of 30 right?)
>>>> -MaximumPendingMessageLimit=0 for the non-durable subscription to
>>>> this
>>>> queue
>>>>
>>>>
>>>> #2 Queue configurations
>>>> I tried to set MaximumPendingMessageLimit when I create the queue.
>>>> mySession.createQueue(“MyQueue” +
>>>> "? 
>>>> consumer.prefetchSize=20&consumer.maximumPendingMessageLimit=10");
>>>>
>>>> What I see from JMX…
>>>> -QueueSize of my queue growing forever
>>>> -The value for the non-durable subscription to this queue are:
>>>>     MaximumPendingMessageLimit=10
>>>>     PrefetchSize=20
>>>>
>>>> #3 Memory limit
>>>> As a last resort I tried to set a memory limit on my policyEntry
>>>> and on my
>>>> 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.
>>>>
>>>> Could someone help me make my PendingMessageLimit works so I don’t
>>>> run out
>>>> of memory.
>>>> Thanks for your help
>>>>
>>>> Yannick
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22460136.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>
>> ---
>> Mit freundlichen Grüssen - Kind Regards
>> Andreas Gies
>> Principal Consultant
>> Open Source Center of Competence
>>
>> Progress Software GmbH
>> Agrippinawerft 26
>> 50678 Köln
>>
>> E-Mail      	agies@progress.com
>> Direct Line 	+49 (0)9953 980349
>> Mobile      	+49 (0)170 5759611
>> Skype        	+44 (0)20 3239 2922
>> Skype       	+353 (0)1 443 4971
>> Skype       	+1 (0)781 262 0168
>>
>> http://www.progress.com
>> http://fusesource.com
>> http://open-source-adventures.blogspot.com
>>
>>
>>
>> -------------------------------------------------------
>> Progress Software GmbH
>> Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
>> Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
>> Amtsgericht Koeln, HRB 15620;
>> Geschaeftsfuehrung: David Ireland
>> -------------------------------------------------------
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22463774.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

---
Mit freundlichen Grüssen - Kind Regards
Andreas Gies
Principal Consultant
Open Source Center of Competence

Progress Software GmbH
Agrippinawerft 26
50678 Köln

E-Mail      	agies@progress.com
Direct Line 	+49 (0)9953 980349
Mobile      	+49 (0)170 5759611
Skype        	+44 (0)20 3239 2922
Skype       	+353 (0)1 443 4971
Skype       	+1 (0)781 262 0168

http://www.progress.com
http://fusesource.com
http://open-source-adventures.blogspot.com



-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------

Re: Fast producers,slow consumer... queue growing forever

Posted by Yenki <ya...@gmail.com>.
Hi Andreas,

thanks for your help! We also managed to make memory limit work on 5.2. But
we still have problemes with message eviction. I'v create a small
application to test it while stepping in ActiveMQ code. What I found is that
one evicted message out of two is redirected to the client. I'm almost
convinced there is a bug there.
does Anybody have the same problem?

Yannick

Andreas Gies-3 wrote:
> 
> Hi there,
> 
> I have run into a similar issue with a later version of ActiveMQ and  
> have blogged about that.
> Perhaps that helps you:
> http://open-source-adventures.blogspot.com/2009/01/limiting-disk-store-usage-with-active.html
> 
> Best regards
> Andreas
> 
> On Mar 11, 2009, at 6:24 PM, pclovec wrote:
> 
>>
>> Make met same problem
>>
>> Yenki wrote:
>>>
>>> Hi, for the last few days I’ve been trying to solve a fast  
>>> producers /
>>> 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  
>>> messages
>>> in the queue itself (doesn’t work). I use ActiveMQ 4.1.2 Here is  
>>> what I
>>> tried:
>>>
>>> #1 Setup destinations policies
>>> I added this to my activemq.xml
>>>
>>>    <destinationPolicy>
>>>      <policyMap><policyEntries>
>>>          <policyEntry queue=">">
>>>            <pendingMessageLimitStrategy>
>>>              <constantPendingMessageLimitStrategy limit="10"/>
>>>            </pendingMessageLimitStrategy>
>>> 	    <messageEvictionStrategy>
>>> 	      <oldestMessageEvictionStrategy/>
>>>            </messageEvictionStrategy >
>>>          </policyEntry>
>>>      </policyEntries></policyMap>
>>>    </destinationPolicy>
>>>
>>> How can I know if my policies are applied? They don’t seem to be  
>>> because
>>> when I run my application my queue is growing until out of memory.  
>>> What I
>>> see from JMX…
>>> -QueueSize of my queue growing forever (with prefetch of 20 & pending
>>> limit of 10 I would expect a max of 30 right?)
>>> -MaximumPendingMessageLimit=0 for the non-durable subscription to  
>>> this
>>> queue
>>>
>>>
>>> #2 Queue configurations
>>> I tried to set MaximumPendingMessageLimit when I create the queue.
>>> mySession.createQueue(“MyQueue” +
>>> "?consumer.prefetchSize=20&consumer.maximumPendingMessageLimit=10");
>>>
>>> What I see from JMX…
>>> -QueueSize of my queue growing forever
>>> -The value for the non-durable subscription to this queue are:
>>>      MaximumPendingMessageLimit=10
>>>      PrefetchSize=20
>>>
>>> #3 Memory limit
>>> As a last resort I tried to set a memory limit on my policyEntry  
>>> and on my
>>> 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.
>>>
>>> Could someone help me make my PendingMessageLimit works so I don’t  
>>> run out
>>> of memory.
>>> Thanks for your help
>>>
>>> Yannick
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22460136.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> ---
> Mit freundlichen Grüssen - Kind Regards
> Andreas Gies
> Principal Consultant
> Open Source Center of Competence
> 
> Progress Software GmbH
> Agrippinawerft 26
> 50678 Köln
> 
> E-Mail      	agies@progress.com
> Direct Line 	+49 (0)9953 980349
> Mobile      	+49 (0)170 5759611
> Skype        	+44 (0)20 3239 2922
> Skype       	+353 (0)1 443 4971
> Skype       	+1 (0)781 262 0168
> 
> http://www.progress.com
> http://fusesource.com
> http://open-source-adventures.blogspot.com
> 
> 
> 
> -------------------------------------------------------
> Progress Software GmbH
> Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
> Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
> Amtsgericht Koeln, HRB 15620;
> Geschaeftsfuehrung: David Ireland
> -------------------------------------------------------
> 
> 

-- 
View this message in context: http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22463774.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Fast producers,slow consumer... queue growing forever

Posted by Andreas Gies <ag...@progress.com>.
Hi there,

I have run into a similar issue with a later version of ActiveMQ and  
have blogged about that.
Perhaps that helps you: http://open-source-adventures.blogspot.com/2009/01/limiting-disk-store-usage-with-active.html

Best regards
Andreas

On Mar 11, 2009, at 6:24 PM, pclovec wrote:

>
> Make met same problem
>
> Yenki wrote:
>>
>> Hi, for the last few days I’ve been trying to solve a fast  
>> producers /
>> 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  
>> messages
>> in the queue itself (doesn’t work). I use ActiveMQ 4.1.2 Here is  
>> what I
>> tried:
>>
>> #1 Setup destinations policies
>> I added this to my activemq.xml
>>
>>    <destinationPolicy>
>>      <policyMap><policyEntries>
>>          <policyEntry queue=">">
>>            <pendingMessageLimitStrategy>
>>              <constantPendingMessageLimitStrategy limit="10"/>
>>            </pendingMessageLimitStrategy>
>> 	    <messageEvictionStrategy>
>> 	      <oldestMessageEvictionStrategy/>
>>            </messageEvictionStrategy >
>>          </policyEntry>
>>      </policyEntries></policyMap>
>>    </destinationPolicy>
>>
>> How can I know if my policies are applied? They don’t seem to be  
>> because
>> when I run my application my queue is growing until out of memory.  
>> What I
>> see from JMX…
>> -QueueSize of my queue growing forever (with prefetch of 20 & pending
>> limit of 10 I would expect a max of 30 right?)
>> -MaximumPendingMessageLimit=0 for the non-durable subscription to  
>> this
>> queue
>>
>>
>> #2 Queue configurations
>> I tried to set MaximumPendingMessageLimit when I create the queue.
>> mySession.createQueue(“MyQueue” +
>> "?consumer.prefetchSize=20&consumer.maximumPendingMessageLimit=10");
>>
>> What I see from JMX…
>> -QueueSize of my queue growing forever
>> -The value for the non-durable subscription to this queue are:
>>      MaximumPendingMessageLimit=10
>>      PrefetchSize=20
>>
>> #3 Memory limit
>> As a last resort I tried to set a memory limit on my policyEntry  
>> and on my
>> 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.
>>
>> Could someone help me make my PendingMessageLimit works so I don’t  
>> run out
>> of memory.
>> Thanks for your help
>>
>> Yannick
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22460136.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

---
Mit freundlichen Grüssen - Kind Regards
Andreas Gies
Principal Consultant
Open Source Center of Competence

Progress Software GmbH
Agrippinawerft 26
50678 Köln

E-Mail      	agies@progress.com
Direct Line 	+49 (0)9953 980349
Mobile      	+49 (0)170 5759611
Skype        	+44 (0)20 3239 2922
Skype       	+353 (0)1 443 4971
Skype       	+1 (0)781 262 0168

http://www.progress.com
http://fusesource.com
http://open-source-adventures.blogspot.com



-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------

Re: Fast producers,slow consumer... queue growing forever

Posted by pclovec <pc...@gmail.com>.
 Make met same problem

Yenki wrote:
> 
> Hi, for the last few days I’ve been trying to solve a fast producers /
> 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 messages
> in the queue itself (doesn’t work). I use ActiveMQ 4.1.2 Here is what I
> tried:
> 
> #1 Setup destinations policies
> I added this to my activemq.xml
> 
>     <destinationPolicy>
>       <policyMap><policyEntries>
>           <policyEntry queue=">">
>             <pendingMessageLimitStrategy>
>               <constantPendingMessageLimitStrategy limit="10"/>
>             </pendingMessageLimitStrategy>
> 	    <messageEvictionStrategy>
> 	      <oldestMessageEvictionStrategy/>
>             </messageEvictionStrategy >
>           </policyEntry>
>       </policyEntries></policyMap>
>     </destinationPolicy>
> 
> How can I know if my policies are applied? They don’t seem to be because
> when I run my application my queue is growing until out of memory. What I
> see from JMX…
> -QueueSize of my queue growing forever (with prefetch of 20 & pending
> limit of 10 I would expect a max of 30 right?)
> -MaximumPendingMessageLimit=0 for the non-durable subscription to this
> queue
> 
> 
> #2 Queue configurations
> I tried to set MaximumPendingMessageLimit when I create the queue.
> mySession.createQueue(“MyQueue” +
> "?consumer.prefetchSize=20&consumer.maximumPendingMessageLimit=10");
> 
> What I see from JMX…
> -QueueSize of my queue growing forever
> -The value for the non-durable subscription to this queue are:
>       MaximumPendingMessageLimit=10 
>       PrefetchSize=20
> 
> #3 Memory limit
> As a last resort I tried to set a memory limit on my policyEntry and on my
> 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.
> 
> Could someone help me make my PendingMessageLimit works so I don’t run out
> of memory.
> Thanks for your help
> 
> Yannick
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-tp22373306p22460136.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.