You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA, INC.]" <ra...@nasa.gov.INVALID> on 2021/12/01 14:41:18 UTC

RE: Policy entry queue memory limit question

I tried using this configuration below, and produce 1MB messages using "ant producer -Durl=tcp://localhost:61616 -Dtopic=false -Dsubject=queueName -Ddurable=true -DmessageSize=1048576.
However; the producer is not blocked till the storage is full.  Does "memoryLimit="1mb" in policyEntry work?

<destinationPolicy>
            <policyMap>
              <policyEntries>
                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="1 mb">
                     </policyEntry>
              </policyEntries>
            </policyMap>
</destinationPolicy>
<systemUsage>
            <systemUsage>
                <memoryUsage>
                              <memoryUsage limit="2 mb" />
                </memoryUsage>
                <storeUsage>
                              <storeUsage limit="5 mb"/>
                </storeUsage>
                <tempUsage>
                              <tempUsage limit="1 mb"/>
                </tempUsage>
            </systemUsage>
</systemUsage>

From: Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA, INC.]
Sent: Tuesday, November 30, 2021 3:38 PM
To: users@activemq.apache.org
Subject: Policy entry queue memory limit question

When I have configuration like "<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">", does it mean each queues will take up to total of 1 MB of messages before it starts blocking producer messages?

Thanks

Regards,
Rahman

Re: Policy entry queue memory limit question

Posted by Tim Bain <tb...@alumni.duke.edu>.
Persistent messages are written to persistent store and are controlled by
that limit, while non-persistent messages are written to the memory store
and are controlled by that limit. So in order to see the memory store limit
applied, you'll need to be sending non-persistent messages.

Tim

On Wed, Dec 1, 2021, 7:41 AM Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA,
INC.] <ra...@nasa.gov.invalid> wrote:

> I tried using this configuration below, and produce 1MB messages using
> "ant producer -Durl=tcp://localhost:61616 -Dtopic=false -Dsubject=queueName
> -Ddurable=true -DmessageSize=1048576.
> However; the producer is not blocked till the storage is full.  Does
> "memoryLimit="1mb" in policyEntry work?
>
> <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                     <policyEntry queue=">" producerFlowControl="true"
> memoryLimit="1 mb">
>                      </policyEntry>
>               </policyEntries>
>             </policyMap>
> </destinationPolicy>
> <systemUsage>
>             <systemUsage>
>                 <memoryUsage>
>                               <memoryUsage limit="2 mb" />
>                 </memoryUsage>
>                 <storeUsage>
>                               <storeUsage limit="5 mb"/>
>                 </storeUsage>
>                 <tempUsage>
>                               <tempUsage limit="1 mb"/>
>                 </tempUsage>
>             </systemUsage>
> </systemUsage>
>
> From: Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA, INC.]
> Sent: Tuesday, November 30, 2021 3:38 PM
> To: users@activemq.apache.org
> Subject: Policy entry queue memory limit question
>
> When I have configuration like "<policyEntry queue=">"
> producerFlowControl="true" memoryLimit="1mb">", does it mean each queues
> will take up to total of 1 MB of messages before it starts blocking
> producer messages?
>
> Thanks
>
> Regards,
> Rahman
>

Re: Policy entry queue memory limit question

Posted by Matt Pavlovich <ma...@gmail.com>.
Hi Rahman-

The memory usage is split 70/30 to producers/consumers by default. Be sure to turn on useCache=“true” for persistent messages if you are trying to trigger the memoryLimit PFC. With your test, you generally won’t see producer flow control with just producing. You probably see memoryLimit sitting at 69% or 70%, since 30% of the memory is set aside for consumers. Add a slow consumer to the queue after a few hundred messages are produced, while running a couple producers in parallel to get the memoryLimit usage exception to get triggered.

Thanks,
-Matt Pavlovich

> On Dec 1, 2021, at 8:41 AM, Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA, INC.] <ra...@nasa.gov.INVALID> wrote:
> 
> I tried using this configuration below, and produce 1MB messages using "ant producer -Durl=tcp://localhost:61616 -Dtopic=false -Dsubject=queueName -Ddurable=true -DmessageSize=1048576.
> However; the producer is not blocked till the storage is full.  Does "memoryLimit="1mb" in policyEntry work?
> 
> <destinationPolicy>
>            <policyMap>
>              <policyEntries>
>                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="1 mb">
>                     </policyEntry>
>              </policyEntries>
>            </policyMap>
> </destinationPolicy>
> <systemUsage>
>            <systemUsage>
>                <memoryUsage>
>                              <memoryUsage limit="2 mb" />
>                </memoryUsage>
>                <storeUsage>
>                              <storeUsage limit="5 mb"/>
>                </storeUsage>
>                <tempUsage>
>                              <tempUsage limit="1 mb"/>
>                </tempUsage>
>            </systemUsage>
> </systemUsage>
> 
> From: Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA, INC.]
> Sent: Tuesday, November 30, 2021 3:38 PM
> To: users@activemq.apache.org
> Subject: Policy entry queue memory limit question
> 
> When I have configuration like "<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">", does it mean each queues will take up to total of 1 MB of messages before it starts blocking producer messages?
> 
> Thanks
> 
> Regards,
> Rahman