[ 
https://issues.apache.org/jira/browse/ARTEMIS-2380?focusedWorklogId=305127&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-305127
 ]

ASF GitHub Bot logged work on ARTEMIS-2380:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Sep/19 10:18
            Start Date: 02/Sep/19 10:18
    Worklog Time Spent: 10m 
      Work Description: wy96f commented on pull request #2703: ARTEMIS-2380 Fix 
delivering message in the case of consume close
URL: https://github.com/apache/activemq-artemis/pull/2703#discussion_r319896346
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java
 ##########
 @@ -175,6 +179,8 @@ protected void rollbackRedelivery(Transaction tx, 
MessageReference ref, long tim
    @Override
    public void afterCommit(final Transaction tx) {
       for (MessageReference ref : refsToAck) {
+         clearLingerRef(ref);
 
 Review comment:
   I think it just holds the queue which the first acked message belongs to. 
Following acked messages in this transaction maybe from other queues since a 
session might create consumers subscribing to different queues.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 305127)
    Time Spent: 8h 10m  (was: 8h)

> Fix delivering message in the case of consume close
> ---------------------------------------------------
>
>                 Key: ARTEMIS-2380
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2380
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>            Reporter: yangwei
>            Priority: Major
>          Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> When consumer is closed and transaction is not committed or rollbacked, the 
> msg acked is not showed by delivering message but counted by delivering count.
> We add closed consumer if any message is acked but not committed or 
> rollbacked, and remove closed consumer if transaction is finished. In this 
> way, delivering messages can be properly retained.
> During calling hasCosnumer and getConsumerId, there is some race condition 
> that emptyConsumerId is called causing following getConsumerId throws 
> IllegalStateException. Also optimize it without extra effort.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to