[
https://issues.apache.org/jira/browse/ARTEMIS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733073#comment-16733073
]
ASF GitHub Bot commented on ARTEMIS-196:
----------------------------------------
Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2488#discussion_r245008661
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
---
@@ -3080,45 +3053,20 @@ private boolean deliverDirect(final
MessageReference ref) {
return true;
}
- int startPos = pos;
-
- int size = consumerList.size();
+ consumers.reset();
- while (true) {
- ConsumerHolder<? extends Consumer> holder;
- if (redistributor == null) {
- holder = consumerList.get(pos);
- } else {
- holder = redistributor;
- }
+ while (consumers.hasNext() || redistributor != null) {
--- End diff --
Trying to keep to standard interfaces, this is the standard Iterator
methods. Also at this point in the while we do not want to actually get the
next, theres some timeouts and other checks needed to be done first, thus next
is called a little later on.
> Implementing Consumer Priority
> ------------------------------
>
> Key: ARTEMIS-196
> URL: https://issues.apache.org/jira/browse/ARTEMIS-196
> Project: ActiveMQ Artemis
> Issue Type: Sub-task
> Components: OpenWire
> Affects Versions: 1.0.0
> Reporter: Howard Gao
> Priority: Major
> Fix For: unscheduled
>
>
> ref: http://activemq.apache.org/consumer-priority.html
> org.apache.activemq.QueueConsumerPriorityTest
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)