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();
|
||||
|
||||
|
@ -168,7 +168,12 @@ public class Queue implements Destination {
|
|||
consumers.add(sub);
|
||||
}
|
||||
|
||||
highestSubscriptionPriority = calcHighestSubscriptionPriority();
|
||||
if (sub.getConsumerInfo().getPriority() > highestSubscriptionPriority) {
|
||||
highestSubscriptionPriority = sub.getConsumerInfo().getPriority();
|
||||
}
|
||||
}
|
||||
|
||||
//highestSubscriptionPriority = calcHighestSubscriptionPriority();
|
||||
msgContext.setDestination(destination);
|
||||
|
||||
synchronized (messages) {
|
||||
|
|
Loading…
Reference in New Issue