From c255d1ddcb29a93c1ce0e6dfc14f85d2b46d1fd9 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Fri, 3 Jun 2011 10:08:22 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-3356 - DispatchedQueueCount (messages pending dispatch) should be visible on the jmx connection view git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1130974 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/jmx/ConnectionView.java | 4 ++++ .../apache/activemq/broker/jmx/ConnectionViewMBean.java | 9 ++++++++- activemq-web-console/src/main/webapp/connection.jsp | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java index 4b2978d7ad..17ac3da483 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java @@ -62,6 +62,10 @@ public class ConnectionView implements ConnectionViewMBean { return connection.isActive(); } + public int getDispatchQueueSize() { + return connection.getDispatchQueueSize(); + } + /** * Resets the statistics */ diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java index af1027e10c..64bfd0cbbb 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java @@ -52,9 +52,16 @@ public interface ConnectionViewMBean extends Service { /** * Returns the source address for this connection * - * @return the souce address for this connection + * @return the source address for this connection */ @MBeanInfo("Source address for this connection") String getRemoteAddress(); + /** + * Returns the number of messages to be dispatched to this connection + * @return the number of messages pending dispatch + */ + @MBeanInfo("The number of messages pending dispatch") + public int getDispatchQueueSize(); + } diff --git a/activemq-web-console/src/main/webapp/connection.jsp b/activemq-web-console/src/main/webapp/connection.jsp index 62b9e5e319..c5b66f3bf9 100644 --- a/activemq-web-console/src/main/webapp/connection.jsp +++ b/activemq-web-console/src/main/webapp/connection.jsp @@ -61,6 +61,10 @@ No connection could be found for ID Slow + + Dispatch Queue Size + +