mirror of https://github.com/apache/activemq.git
Added optimization to determine the highest priority consumer during addition of subscription.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@473223 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8951023556
commit
a8f4f6978c
|
@ -82,7 +82,7 @@ public class Queue implements Destination {
|
|||
protected long garbageSizeBeforeCollection = 1000;
|
||||
private DispatchPolicy dispatchPolicy = new RoundRobinDispatchPolicy();
|
||||
protected final MessageStore store;
|
||||
protected int highestSubscriptionPriority;
|
||||
protected int highestSubscriptionPriority = Integer.MIN_VALUE;
|
||||
private DeadLetterStrategy deadLetterStrategy = new SharedDeadLetterStrategy();
|
||||
private MessageGroupMapFactory messageGroupMapFactory = new MessageGroupHashBucketFactory();
|
||||
|
||||
|
@ -166,9 +166,14 @@ public class Queue implements Destination {
|
|||
consumers.add(0, sub);
|
||||
} else {
|
||||
consumers.add(sub);
|
||||
}
|
||||
|
||||
if (sub.getConsumerInfo().getPriority() > highestSubscriptionPriority) {
|
||||
highestSubscriptionPriority = sub.getConsumerInfo().getPriority();
|
||||
}
|
||||
}
|
||||
|
||||
highestSubscriptionPriority = calcHighestSubscriptionPriority();
|
||||
//highestSubscriptionPriority = calcHighestSubscriptionPriority();
|
||||
msgContext.setDestination(destination);
|
||||
|
||||
synchronized (messages) {
|
||||
|
|
Loading…
Reference in New Issue