Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-5076

Ability to return the distribution of messages in a queue based on their arrival date with JMX QueueControl

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • JMX, management
    • None

    Description

      By grouping and counting messages by time range, this feature would provide operators with an overview of when messages still present in the queue originally arrived.
      The primary use-case would be for dead-letter queues and for investigating problems based on the time ranges highlighted in the returned data.

      The output is in JSON, start and end indicates the range, and count is the number of messages found within that range.

      {
        {
          start: "start-timestamp",
          end: "end-timestamp",
          count: "number-of-messages"
        },
        ...
      } 

      The JSON can be used to generate histograms if needed.

       

      Proposal:

      • Method "countMessagesByArrival(groupUnit, filter)".

      The groupUnit argument is used to group messages, default value being "Days" (other possibility can be Seconds, Minutes, ...).
      A message's group is determined based on its timestamp and the selected groupUnit.
      The filter allows messages in the queue to be filtered before the distribution is computed.

      Each message in the queue is checked against the filter. The group for each message is determined based on the groupUnit and the message's timestamp. 
      Finally, a message counter is incremented for the corresponding group.

      This method could be expensive, as it needs to scan all messages in a queue. Therefore, the method description should clearly highlight this.

      Example output with groupUnit="SECONDS"

      {
        {
          start: "1727706968000",
          end: "1727706969000",
          count: "3"
        },
        {
          start: "1727706976000",
          end: "1727706977000",
          count: "10"
        },
        {
          start: "1727706980000",
          end: "1727706981000",
          count: "10"
        }
      } 

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jpbriquet Jean-Pascal Briquet

            Dates

              Created:
              Updated:

              Slack

                Issue deployment