You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/01/17 19:38:00 UTC

[jira] [Work logged] (AMQ-8463) Add advancedMessageStatistics to destinations

     [ https://issues.apache.org/jira/browse/AMQ-8463?focusedWorklogId=953004&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-953004 ]

ASF GitHub Bot logged work on AMQ-8463:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Jan/25 19:37
            Start Date: 17/Jan/25 19:37
    Worklog Time Spent: 10m 
      Work Description: mattrpav commented on code in PR #1329:
URL: https://github.com/apache/activemq/pull/1329#discussion_r1920660993


##########
activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java:
##########
@@ -620,4 +621,67 @@ public long getNetworkDequeues() {
         return destination.getDestinationStatistics().getNetworkDequeues().getCount();
     }
 
+    @Override
+    public boolean isAdvancedMessageStatisticsEnabled() {
+        return destination.isAdvancedMessageStatisticsEnabled();
+    }
+
+    @Override
+    public void setAdvancedMessageStatisticsEnabled(boolean advancedMessageStatisticsEnabled) {
+        destination.setAdvancedMessageStatisticsEnabled(advancedMessageStatisticsEnabled);
+    }
+
+    @Override
+    public long getEnqueuedMessageBrokerInTime() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getEnqueuedMessageBrokerInTime().getValue() : 0l);
+    }
+
+    @Override
+    public String getEnqueuedMessageClientId() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getEnqueuedMessageClientID().getValue() : null);
+    }
+
+    @Override
+    public String getEnqueuedMessageId() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getEnqueuedMessageID().getValue() : null);
+    }
+
+    @Override
+    public long getEnqueuedMessageTimestamp() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getEnqueuedMessageTimestamp().getValue() : 0l);
+    }
+
+    @Override
+    public long getDequeuedMessageBrokerInTime() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getDequeuedMessageBrokerInTime().getValue() : 0l);
+    }
+
+    @Override
+    public long getDequeuedMessageBrokerOutTime() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getDequeuedMessageBrokerOutTime().getValue() : 0l);
+    }
+
+    @Override
+    public String getDequeuedMessageClientId() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getDequeuedMessageClientID().getValue() : null);
+    }
+
+    @Override
+    public String getDequeuedMessageId() {
+        MessageFlowStats tmpMessageFlowStats = destination.getDestinationStatistics().getMessageFlowStats();
+        return (tmpMessageFlowStats != null ? tmpMessageFlowStats.getDequeuedMessageID().getValue() : null);
+    }
+
+    @Override
+    public long getDequeuedMessageTimestamp() {

Review Comment:
   Completed w/ cshannon's change





Issue Time Tracking
-------------------

    Worklog Id:     (was: 953004)
    Time Spent: 4.5h  (was: 4h 20m)

> Add advancedMessageStatistics to destinations
> ---------------------------------------------
>
>                 Key: AMQ-8463
>                 URL: https://issues.apache.org/jira/browse/AMQ-8463
>             Project: ActiveMQ Classic
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: Matt Pavlovich
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 6.2.0
>
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> Observability and tracking metrics on the destination can provide current message age and indication of message flow activity.
> // Most recent enqueued message info
> enqueuedMessageID 
> enqueuedMessageTimestamp
> enqueuedMessageBrokerInTime
> // Most recent dequeued message info
> dequeuedMessageID
> dequeuedMessageTimestamp
> dequeuedMessageBrokerInTime
> // First enqueue since boot
> firstEnqueuedMessageID
> firstEnqueuedMessageTimestamp 
> firstEnqueuedMessageBrokerInTime
> // First dequeue since boot
> firstDequeuedMessageID
> firstDequeuedMessageTimestamp
> firstDequeuedMessageBrokerInTime



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact