michaelpearce-gain commented on code in PR #4126:
URL: https://github.com/apache/activemq-artemis/pull/4126#discussion_r910324305


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java:
##########
@@ -1770,8 +1770,26 @@ public String listConsumersAsJSON() throws Exception {
 
             if (consumer instanceof ServerConsumer) {
                ServerConsumer serverConsumer = (ServerConsumer) consumer;
-
-               JsonObjectBuilder obj = 
JsonLoader.createObjectBuilder().add("consumerID", 
serverConsumer.getID()).add("connectionID", 
serverConsumer.getConnectionID().toString()).add("sessionID", 
serverConsumer.getSessionID()).add("browseOnly", 
serverConsumer.isBrowseOnly()).add("creationTime", 
serverConsumer.getCreationTime());
+               List<MessageReference> deliveringMessages = 
consumer.getDeliveringMessages();
+               long deliveringMessageSize = 0;
+               for (int i = 0; i < deliveringMessages.size(); i++) {

Review Comment:
   What happens here if delivering message size changes as you are looping? 
Wont we get npes or concurrent exceptions 



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