From ae7df9fcaa2648432827a898ad7905730245b0f0 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Wed, 26 May 2010 16:29:38 +0000 Subject: [PATCH] help in diagnosis of https://issues.apache.org/activemq/browse/AMQ-2749 - provide log message when waiting for space to free up git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@948489 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/broker/region/TopicSubscription.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java index 784ccc48b0..8b24768211 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java @@ -107,12 +107,17 @@ public class TopicSubscription extends AbstractSubscription { } } 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); }