activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r992241 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Date Fri, 03 Sep 2010 09:19:51 GMT
Author: gtully
Date: Fri Sep  3 09:19:50 2010
New Revision: 992241

URL: http://svn.apache.org/viewvc?rev=992241&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2891 - add some progress info messages for cursor
recovery, kicks in a 50000 messages

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=992241&r1=992240&r2=992241&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Fri Sep  3 09:19:50 2010
@@ -276,10 +276,17 @@ public class Queue extends BaseDestinati
             messages.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
             if (messages.isRecoveryRequired()) {
                 store.recover(new MessageRecoveryListener() {
+                    double totalMessageCount = store.getMessageCount();
+                    int recoveredMessageCount = 0;
 
                     public boolean recoverMessage(Message message) {
                         // Message could have expired while it was being
                         // loaded..
+                        if ((++recoveredMessageCount % 50000) == 0) {
+                            LOG.info("cursor for " + getActiveMQDestination().getQualifiedName()
+ " has recovered "
+                                    + recoveredMessageCount + " messages. " +
+                                    (int)(recoveredMessageCount*100/totalMessageCount) +
"% complete");
+                        }
                         if (message.isExpired()) {
                             if (broker.isExpired(message)) {
                                 messageExpired(createConnectionContext(), createMessageReference(message));



Mime
View raw message