michaelpearce-gain commented on a change in pull request #3066: ARTEMIS-2699 
Warn if queue stats are limited by default maxRows
URL: https://github.com/apache/activemq-artemis/pull/3066#discussion_r404103712
 
 

 ##########
 File path: 
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/queue/StatQueue.java
 ##########
 @@ -151,11 +155,16 @@ private void printStats(String result) {
       }
 
       JsonObject queuesAsJsonObject = JsonUtil.readJsonObject(result);
-      JsonArray array = (JsonArray) queuesAsJsonObject.get("data");
+      int count = queuesAsJsonObject.getInt("count");
+      JsonArray array = queuesAsJsonObject.getJsonArray("data");
 
       for (int i = 0; i < array.size(); i++) {
          printQueueStats(array.getJsonObject(i));
       }
+
+      if (maxRows == null && count > printingMaxRows) {
 
 Review comment:
   i think its a) simpler to not discriminate b) even if i set 100 manually, it 
still useful to get an output to tell me whilst i set 100 it wasnt all the 
messages (and include the count in the output)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to