This is an automated email from the ASF dual-hosted git repository.
mattrpav pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new 5658dc7aad [#1823] Align DestinationView and DestinationViewMBean
(#1824)
5658dc7aad is described below
commit 5658dc7aadf87feec1c293ac0fa9bb9f607f99aa
Author: Matt Pavlovich <[email protected]>
AuthorDate: Thu Mar 26 10:30:39 2026 -0500
[#1823] Align DestinationView and DestinationViewMBean (#1824)
---
.../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 de1d2a2752..29931e9e1d 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
@@ -136,6 +136,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();
}
@@ -437,10 +443,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 421ebb6ce3..c5b0f56397 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