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

moveMessages operation can move more messages than max messageCount

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.36.0
    • 2.37.0
    • management
    • None

    Description

      When paging and many messages in a queue, the following is observed:

      $ bin/artemis producer --user admin --password admin --url tcp://localhost:61616 --message-count 10000 --message-size 10240 --destination queue://FOO
      ...
      $ curl -XPOST -H "Content-Type: application/json" -H "Origin: http://localhost" --user "admin:admin" -d '

      {"type":"exec","mbean":"org.apache.activemq.artemis:broker=\"0.0.0.0\",component=addresses,address=\"FOO\",subcomponent=queues,routing-type=\"anycast\",queue=\"FOO\"","operation":"moveMessages(int,java.lang.String,java.lang.String,boolean,int)","arguments":[500,"","DLQ",false,500]}

      '
      ...
      {"request":

      {"mbean":"org.apache.activemq.artemis:address=\"FOO\",broker=\"0.0.0.0\",component=addresses,queue=\"FOO\",routing-type=\"anycast\",subcomponent=queues","arguments":[500,"","DLQ",false,500],"type":"exec","operation":"moveMessages(int,java.lang.String,java.lang.String,boolean,int)"}

      ,"value":8630,"timestamp":1718395680,"status":200}

      Note that the messageCount for the moveMessages operation was 500, but in reality 8630 messages were moved (verified with queue stats). This does not seem to happen for queues with a low queue depth.

      Attachments

        Issue Links

          Activity

            People

              gaohoward Howard Gao
              gaohoward Howard Gao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m