[ 
https://issues.apache.org/jira/browse/ARTEMIS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733141#comment-16733141
 ] 

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_r245029745
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ---
    @@ -2497,45 +2494,36 @@ private void deliver() {
     
     
                       handled++;
    -
    +                  consumers.reset();
                       continue;
                    }
     
                    if (logger.isTraceEnabled()) {
                       logger.trace("Queue " + this.getName() + " is delivering 
reference " + ref);
                    }
     
    -               // If a group id is set, then this overrides the consumer 
chosen round-robin
    +               final SimpleString groupID = extractGroupID(ref);
    +               groupConsumer = getGroupConsumer(groupConsumer, groupID);
     
    -               SimpleString groupID = extractGroupID(ref);
    -
    -               if (groupID != null) {
    -                  groupConsumer = groups.get(groupID);
    -
    -                  if (groupConsumer != null) {
    -                     consumer = groupConsumer;
    -                  }
    -               }
    -
    -               if (exclusive && redistributor == null) {
    -                  consumer = consumerList.get(0).consumer;
    +               if (groupConsumer != null) {
    +                  consumer = groupConsumer;
                    }
     
                    HandleStatus status = handle(ref, consumer);
     
                    if (status == HandleStatus.HANDLED) {
     
    -                  deliveriesInTransit.countUp();
    -
    -                  handledconsumer = consumer;
    -
    -                  removeMessageReference(holder, ref);
    -
                       if (redistributor == null) {
                          handleMessageGroup(ref, consumer, groupConsumer, 
groupID);
                       }
     
    +                  deliveriesInTransit.countUp();
    +
    +
    +                  removeMessageReference(holder, ref);
    +                  handledconsumer = consumer;
                       handled++;
    +                  consumers.reset();
    --- End diff --
    
    resolving as discussed else where


> 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)

Reply via email to