From ee4bb53a7de81d40525e623677f2adb06f76bb86 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Thu, 8 Feb 2007 05:55:56 +0000 Subject: [PATCH] tell the PendingMessageCursor how many messages you want - for more efficent polling from store git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@504798 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/region/PrefetchSubscription.java | 1 + .../src/main/java/org/apache/activemq/broker/region/Queue.java | 1 + 2 files changed, 2 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java index ba0bb9a3b2..8872f55d85 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java @@ -385,6 +385,7 @@ abstract public class PrefetchSubscription extends AbstractSubscription{ try{ int numberToDispatch=countBeforeFull(); if(numberToDispatch>0){ + pending.setMaxBatchSize(numberToDispatch); int count=0; pending.reset(); while(pending.hasNext()&&!isFull()&&count0){ + messages.setMaxBatchSize(toPageIn); try{ dispatchValve.increment(); int count=0;