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


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java:
##########
@@ -2752,7 +2753,27 @@ public String listAllConsumersAsJSON() throws Exception {
    }
 
    private JsonObject toJSONObject(ServerConsumer consumer) throws Exception {
-      JsonObjectBuilder obj = 
JsonLoader.createObjectBuilder().add("consumerID", 
consumer.getID()).add("connectionID", 
consumer.getConnectionID().toString()).add("sessionID", 
consumer.getSessionID()).add("queueName", 
consumer.getQueue().getName().toString()).add("browseOnly", 
consumer.isBrowseOnly()).add("creationTime", 
consumer.getCreationTime()).add("deliveringCount", 
consumer.getDeliveringMessages().size());
+      List<MessageReference> deliveringMessages = 
consumer.getDeliveringMessages();

Review Comment:
   this is going to hold a lock on the consumer while the messages are copied 
over.
   
   
   if you have a bad consumer leaking on acks, this could make things worse to 
the broker.
   
   Besides this will hold a lock on the ServerConsumer.
   
   Perhaps I'm being over zealous here... but I have seen cases where using the 
console to find what was wrong actually made things worse.
   
   That's my only concern here.



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