mirror of https://github.com/apache/activemq.git
AMQ-1632. Correct prefetch size instead of trying to push messages more often
git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-4.1@640626 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
837d08165d
commit
808f84b9f7
|
@ -181,7 +181,6 @@ abstract public class PrefetchSubscription extends AbstractSubscription{
|
|||
dispatched.remove(node);
|
||||
node.getRegionDestination().getDestinationStatistics().getDequeues().increment();
|
||||
prefetchExtension=Math.max(0,prefetchExtension-1);
|
||||
dispatchMatched();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -153,20 +153,21 @@ public class ActiveMQEndpointWorker {
|
|||
}
|
||||
});
|
||||
|
||||
int prefetchSize = activationSpec.getMaxMessagesPerSessionsIntValue() * activationSpec.getMaxSessionsIntValue();
|
||||
if (activationSpec.isDurableSubscription()) {
|
||||
consumer = connection.createDurableConnectionConsumer(
|
||||
(Topic) dest,
|
||||
activationSpec.getSubscriptionName(),
|
||||
emptyToNull(activationSpec.getMessageSelector()),
|
||||
serverSessionPool,
|
||||
activationSpec.getMaxMessagesPerSessionsIntValue(),
|
||||
prefetchSize,
|
||||
activationSpec.getNoLocalBooleanValue());
|
||||
} else {
|
||||
consumer = connection.createConnectionConsumer(
|
||||
dest,
|
||||
emptyToNull(activationSpec.getMessageSelector()),
|
||||
serverSessionPool,
|
||||
activationSpec.getMaxMessagesPerSessionsIntValue(),
|
||||
prefetchSize,
|
||||
activationSpec.getNoLocalBooleanValue());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue