Why do we get Exception: Usage Manager Memory Limit in our broker logs?

Solution Verified - Updated -

Issue

We are seeing a lot of "Usage Manager Memory Limit" warning messages in our logs:

javax.jms.ResourceAllocationException: Usage Manager Memory Limit reached. Stopping producer (ID:brk01) to prevent flooding queue://XXXX_queue. See http://activemq.apache.org/producer-flow-control.html for more info

Why are we seeing this exception?

  • For example, we have the following configuration in our activemq.xml file as below:
<policyEntry memoryLimit="1mb"
                            topic="HELLO"
                            topicPrefetch="10"
                            producerFlowControl="true">
                   <deadLetterStrategy>
                      <sharedDeadLetterStrategy processExpired="false" />
                   </deadLetterStrategy>
                   <!-- If limit reached, drop old messages and keep newer ones -->
                   <messageEvictionStrategy>
                      <oldestMessageEvictionStrategy/>
                   </messageEvictionStrategy>
                   <!-- Only hold 10 messages above prefetch limit -->
                   <pendingMessageLimitStrategy>
                      <constantPendingMessageLimitStrategy limit="10"/>
                   </pendingMessageLimitStrategy>
               </policyEntry>

               <policyEntry memoryLimit="10mb"
                            topic=">"
                            topicPrefetch="900"
                            producerFlowControl="true">
                   <deadLetterStrategy>
                      <sharedDeadLetterStrategy processExpired="false" />
                   </deadLetterStrategy>
                   <!-- If limit reached, drop old messages and keep newer ones -->
                   <messageEvictionStrategy>
                      <oldestMessageEvictionStrategy/>
                   </messageEvictionStrategy>
                   <!-- Only hold 100 messages above prefetch limit -->
                   <pendingMessageLimitStrategy>
                      <constantPendingMessageLimitStrategy limit="100"/>
                   </pendingMessageLimitStrategy>
               </policyEntry>

  • We want to know if a topic/queue that is not the HELLO topic fills up that those messages beyond the 1000 count that are built up are dropped unless the 1000 messages exceed 10 mb based on our config. If we are seeing the exception then does that mean the messages built up exceed 10 mb?

Environment

  • Fuse Message Broker 5.5.X
  • Fuse MQ Enterprise 7.X
  • Red Hat JBoss A-MQ 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content