[ https://issues.apache.org/jira/browse/ARTEMIS-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17886098#comment-17886098 ]
Jean-Pascal Briquet commented on ARTEMIS-5077: ---------------------------------------------- If the Artemis team finds this feature useful for the project, please let me know as I have already a draft available. > 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 > Priority: Minor > > 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-unsubscr...@activemq.apache.org For additional commands, e-mail: issues-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact