You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2025/11/03 07:10:00 UTC

[jira] [Resolved] (AMQ-9552) StatisticsPlugin - add metric lastMessageTimestamp

     [ https://issues.apache.org/jira/browse/AMQ-9552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved AMQ-9552.
---------------------------------------
    Resolution: Not A Problem

This ticket is covered by [https://github.com/apache/activemq/blob/main/activemq-client/src/main/java/org/apache/activemq/management/MessageFlowStatsImpl.java#L21]

using the _enqueuedMessageBrokerInTime_ or _enqueuedMessageTimestamp_ value.

> StatisticsPlugin - add metric lastMessageTimestamp
> --------------------------------------------------
>
>                 Key: AMQ-9552
>                 URL: https://issues.apache.org/jira/browse/AMQ-9552
>             Project: ActiveMQ Classic
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: Grzegorz Kochański
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Metric {{lastMessageTimestamp}} can be captured from the modification time of metric {{enqueues:}}
>  
> {code:java}
> statsMessage.setLong("lastMessageTimestamp", stats.getEnqueues().getLastSampleTime()); {code}
>  
> Disclaimer: disadvantage of such approach is that after broker restart this value is holding start time of the broker (which may be relevant when the frequency of broker restarts is comparable to the frequency of enqueued messages)



--
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