logger.info("Message Bytes: " + stats.totalMessageBytes); logger.info("Message Count: " + stats.totalMessageCount);
logger.info("Message Bytes: " + stats.totalSentMessageBytes); logger.info("Message Count: " + stats.totalSentMessageCount);
  private void logMessageStatsMetrics() {    if (messageStatsService != null) {      MessageStatistics.Statistics stats = messageStatsService.getMessageStatistics(false);      logger.info("Message Queue: " + stats.averageMessageQueueLength);      logger.info("Message Bytes: " + stats.totalMessageBytes);      logger.info("Message Count: " + stats.totalMessageCount);      long[] h = stats.histogram;      int n = (h != null ? h.length : 0);      n = Math.min(n, MessageStatistics.NBINS);      for (int i = 0; i < n; i++) {        int bin = MessageStatistics.BIN_SIZES[i];        logger.info("Histogram["+bin+"]: "+h[i]);      }    }  }