You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/11/03 03:05:23 UTC

[GitHub] [james-project] chibenwa commented on pull request #1290: [JAMES-3841] ActiveMQ: replace simple connection health check with re…

chibenwa commented on PR #1290:
URL: https://github.com/apache/james-project/pull/1290#issuecomment-1301590131

   From a design perspective I do not like correlating metric collection with the healthcheck.
   
   There are ways to obtain metrics directly from the broker (statistics on, JMX on):
   
   ```
           System.out.println("memoryPercentUsage " + brokerService.getAdminView().getMemoryPercentUsage());
           System.out.println("tempPercentUsage " + brokerService.getAdminView().getTempPercentUsage());
           System.out.println("storePercentUsage " + brokerService.getAdminView().getStorePercentUsage());
           System.out.println("memoryLimit " + brokerService.getAdminView().getMemoryLimit());
           System.out.println("storeLimit " + brokerService.getAdminView().getStoreLimit());
           System.out.println("tempLimit " + brokerService.getAdminView().getTempLimit());
           System.out.println("dequeueCount " + brokerService.getAdminView().getTotalDequeueCount());
           System.out.println("enqueueCount " + brokerService.getAdminView().getTotalEnqueueCount());
           System.out.println("averageMessageSize " + brokerService.getAdminView().getAverageMessageSize());
   ```
   
   Will yield:
   
   ```
   memoryPercentUsage 1
   tempPercentUsage 0
   storePercentUsage 0
   memoryLimit 1073741824
   storeLimit 107374182400
   tempLimit 53687091200
   dequeueCount 1119
   enqueueCount 4156
   averageMessageSize 4097
   ```
   
   This way you would not need to alter the health check to base the metric collection on it: the two would be completely indepandant, which is cleaner.


-- 
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: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org