Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.