Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2490#discussion_r246515810
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
---
@@ -2409,14 +2410,10 @@ private void deliver() {
// Either the iterator is empty or the consumer is busy
int noDelivery = 0;
- int size = 0;
-
- int endPos = -1;
-
int handled = 0;
long timeout = System.currentTimeMillis() + DELIVERY_TIMEOUT;
-
+ consumers.reset();
--- End diff --
Its fine. We actually only want to reset on a succesful handled nomatch or
expired. Or before starting iterating
---