diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java index 7e7c6ecb7f..db4d112546 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java @@ -194,7 +194,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i batchList.clear(); batchResetNeeded = true; this.cacheEnabled=false; - size=0; + size = getStoreSize(); } protected final synchronized void fillBatch() {