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-Pascal Briquet (Jira)" <ji...@apache.org> on 2024/10/01 08:57:00 UTC

[jira] [Created] (ARTEMIS-5077) Peek oldest message in a queue with JMX QueueControl

Jean-Pascal Briquet created ARTEMIS-5077:
--------------------------------------------

             Summary: Peek oldest message in a queue with JMX QueueControl
                 Key: ARTEMIS-5077
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5077
             Project: ActiveMQ Artemis
          Issue Type: New Feature
          Components: JMX, management
            Reporter: Jean-Pascal Briquet


This feature proposal aims to provide a JMX method that allows operators to find the oldest message in a queue when needed.

Messages in a queue can be unordered in the following scenarios (non exhaustive list):
- message redistribution in the cluster
- message move from one queue to another

The existing peekFirstMessage method returns the message at top of the queue but in the above scenarios it is not necessarily always the oldest message.

*Proposal:*
- Method "peekOldestMessageAsJSON(filter)".

The filter allows messages in the queue to be filtered before searching for the oldest message. This parameter is optional.

The oldest message can be found by browsing the queue aand comparing each message's timestamp with the current oldest message candidate.

The method output would list message properties, it is equivalent to the output of the existing peekFirstMessageAsJSON method.

The proposed method would be potentially heavy, as it needs to scan all messages in a queue. 
Therefore, the method description should clearly highlight it.

 

 

 



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