You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2010/05/26 18:29:38 UTC

svn commit: r948489 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java

Author: gtully
Date: Wed May 26 16:29:38 2010
New Revision: 948489

URL: http://svn.apache.org/viewvc?rev=948489&view=rev
Log:
help in diagnosis of https://issues.apache.org/activemq/browse/AMQ-2749 - provide log message when waiting for space to free up

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java?rev=948489&r1=948488&r2=948489&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java Wed May 26 16:29:38 2010
@@ -107,13 +107,18 @@ public class TopicSubscription extends A
                 }
             }
             if (maximumPendingMessages != 0) {
+                boolean warnedAboutWait = false;
             	synchronized(matchedListMutex){
             		while (matched.isFull()){
             		    if (getContext().getStopping().get()) {
-            		        LOG.warn("stopped waiting for space in pendingMessage cursor for: " + node.getMessageId());
+            		        LOG.warn(toString() + ": stopped waiting for space in pendingMessage cursor for: " + node.getMessageId());
             		        enqueueCounter.decrementAndGet();
             		        return;
             		    }
+            		    if (!warnedAboutWait) {
+            		        LOG.info(toString() + ": Pending message cursor ["+ matched + "] is full, temp usage (" + + matched.getSystemUsage().getTempUsage().getPercentUsage() + "%) or memory usage (" + matched.getSystemUsage().getMemoryUsage().getPercentUsage() + "%) limit reached, blocking message add() pending the release of resources.");
+            		        warnedAboutWait = true;
+            		    }
             			matchedListMutex.wait(20);
             		}
             		matched.addMessageLast(node);