[jboss-cvs] JBoss Messaging SVN: r5729 - trunk/src/main/org/jboss/messaging/core/server/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 26 14:45:48 EST 2009
Author: clebert.suconic at jboss.com
Date: 2009-01-26 14:45:48 -0500 (Mon, 26 Jan 2009)
New Revision: 5729
Modified:
trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java
Log:
Log warn on queue when blocked by page
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java 2009-01-26 17:46:44 UTC (rev 5728)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java 2009-01-26 19:45:48 UTC (rev 5729)
@@ -105,6 +105,8 @@
private final Runnable deliverRunner = new DeliverRunner();
private final PagingManager pagingManager;
+
+ private volatile PagingStore pagingStore;
private final StorageManager storageManager;
@@ -1116,6 +1118,14 @@
{
if (iterator == null)
{
+ if (pagingStore != null)
+ {
+ // If the queue is empty, we need to check if there are pending messages, and throw a warning
+ if (pagingStore.isPaging() && !pagingStore.isDropWhenMaxSize())
+ {
+ log.warn("The Queue " + this.name + " is empty, however there are pending messages on Paging for the address " + pagingStore.getStoreName() + " waiting message ACK before they could be routed");
+ }
+ }
// We delivered all the messages - go into direct delivery
direct = true;
@@ -1123,6 +1133,20 @@
}
return;
}
+
+ if (pagingStore == null)
+ {
+ // TODO: It would be better if we could initialize the pagingStore during the construction
+ try
+ {
+ pagingStore = pagingManager.getPageStore(reference.getMessage().getDestination());
+ }
+ catch (Exception e)
+ {
+ // This shouldn't happen, and if it happens, this shouldn't abort the route
+ log.warn("Error getting the page-store Destination", e);
+ }
+ }
HandleStatus status = deliver(reference);
More information about the jboss-cvs-commits
mailing list