mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@680161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08e01e7fb4
commit
7614fe25b7
|
@ -1164,7 +1164,7 @@ public class Queue extends BaseDestination implements Task {
|
|||
// pick the least loaded to add the message too
|
||||
for (Subscription s : targets) {
|
||||
if (target == null
|
||||
|| target.getInFlightUsage() > s.getInFlightUsage()) {
|
||||
|| target.getPendingQueueSize() > s.getPendingQueueSize()) {
|
||||
target = s;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.activemq.broker.BrokerService;
|
|||
import org.apache.activemq.broker.region.policy.PolicyEntry;
|
||||
import org.apache.activemq.broker.region.policy.PolicyMap;
|
||||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
import org.apache.activemq.store.amq.AMQPersistenceAdapter;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
@ -60,6 +61,9 @@ public class AMQ1866 extends TestCase {
|
|||
protected void setUp() throws Exception {
|
||||
// Start an embedded broker up.
|
||||
brokerService = new BrokerService();
|
||||
AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
|
||||
adaptor.setIndexBinSize(4096);
|
||||
brokerService.setPersistenceAdapter(adaptor);
|
||||
brokerService.deleteAllMessages();
|
||||
|
||||
// A small max page size makes this issue occur faster.
|
||||
|
|
Loading…
Reference in New Issue