Github user jdanekrh commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1407
  
    Right. Yeah, I think this one is actual OpenWire handling bug in Artemis. 
If the message expires while it is being prefetched on client, server drops it 
and never tries to expire it.
    
    i may even have a fix, but this message lifecycle is quite complicated, so 
it is likely I am missing something...
    
    ```diff
    --- 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
    +++ 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
    @@ -298,8 +298,9 @@ public class AMQConsumer {
              }
           }
           if (ack.isExpiredAck()) {
    -         //adjust delivering count for expired messages
    -         this.serverConsumer.getQueue().decDelivering(ackList.size());
    +         for (MessageReference ref : ackList) {
    +            ref.getQueue().expire(ref);
    +         }
           }
        }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to