clebertsuconic commented on code in PR #4375:
URL: https://github.com/apache/activemq-artemis/pull/4375#discussion_r1119635292


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java:
##########
@@ -418,6 +418,17 @@ public void cancel(Object brokerConsumer, Message message, 
boolean updateCounts)
       }
    }
 
+   /** to be used when credits were drained between handle and actual delivery 
*/
+   public void returnToQueue(Object brokerConsumer, MessageReference 
reference) {

Review Comment:
   The issue here is really about a memory leak. 
   
   I had credits when handleDelivery was called. later on I called deliver, the 
AMQPStandardMessage would be referenced on a DeliveryImpl that would stay 
forever in the Link.workingList until the session or the connection is closed.
   
   
   I had other issues that I fixed as part of this PR regarding QueueConsumer. 
where the iterator would hung in the Iterators. Perhaps that one would cause 
some issues.
   
   
https://github.com/apache/activemq-artemis/pull/4375/commits/a1aea9a79aa844673ef705d2a60fadb4435accfc#diff-fc4a9a0dc01f79ecc1435246dc85446fa57d6d04e1dffed53c522d8c145623fdR3098-R3105



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to