This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch activemq-5.19.x
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/activemq-5.19.x by this push:
     new 61bbd5d630 [#1823] Align DestinationView and DestinationViewMBean 
(#1824) (#1841)
61bbd5d630 is described below

commit 61bbd5d6303b4ffb2ce1eb0d8ea5d384cfe6b425
Author: Matt Pavlovich <[email protected]>
AuthorDate: Thu Mar 26 11:54:16 2026 -0500

    [#1823] Align DestinationView and DestinationViewMBean (#1824) (#1841)
    
    (cherry picked from commit 5658dc7aadf87feec1c293ac0fa9bb9f607f99aa)
---
 .../apache/activemq/broker/jmx/DestinationView.java  |  8 ++++++++
 .../activemq/broker/jmx/DestinationViewMBean.java    | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
 
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
index 5e0ab749e4..e3e0c45c62 100644
--- 
a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
+++ 
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
@@ -137,6 +137,12 @@ public class DestinationView implements 
DestinationViewMBean {
         return messageStore != null ? 
messageStore.getMessageStoreStatistics().getMessageSize().getTotalSize() : 0;
     }
 
+    @Override
+    public long getMessagesCachedCount() {
+        return 
destination.getDestinationStatistics().getMessagesCached().getCount();
+    }
+
+    @Deprecated(forRemoval = true) // see: getMessagesCachedCount() instead. 
This method name is inconsistent
     public long getMessagesCached() {
         return 
destination.getDestinationStatistics().getMessagesCached().getCount();
     }
@@ -438,10 +444,12 @@ public class DestinationView implements 
DestinationViewMBean {
         return destination.getMaxProducersToAudit();
     }
 
+    @Override
     public boolean isEnableAudit() {
         return destination.isEnableAudit();
     }
 
+    @Override
     public void setEnableAudit(boolean enableAudit) {
         destination.setEnableAudit(enableAudit);
     }
diff --git 
a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
 
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
index 431424f604..fe7bfd5dbf 100644
--- 
a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
+++ 
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
@@ -131,6 +131,13 @@ public interface DestinationViewMBean {
     @MBeanInfo("Number of producers attached to this destination")
     long getProducerCount();
 
+
+    /**
+     * @return the number of messages cached
+     */
+    @MBeanInfo("Number of messages cached")
+    public long getMessagesCachedCount();
+
     /**
      * Returns the number of messages in this destination which are yet to be
      * consumed
@@ -263,6 +270,19 @@ public interface DestinationViewMBean {
     @MBeanInfo("Memory used by undelivered messages in bytes")
     long getMemoryUsageByteCount();
 
+    /**
+     * @return the EnableAudit setting for duplicate message checking
+     */
+    @MBeanInfo("Audit is enabled for duplicate message checking")
+    boolean isEnableAudit();
+
+    /**
+     * set the flag to enable or disable audit for duplicate message checking
+     * @param enableAudit
+     * enable/disable audit on the destination
+     */
+    void setEnableAudit(boolean enableAudit);
+
     /**
      * @return the amount of memory allocated to this destination
      */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to