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

Incorrect number of messages on queue after remove of scheduled message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.6.0
    • None
    • None

    Description

      This will reproduce the failure if added to org.apache.activemq.artemis.tests.integration.management.QueueControlTest:

         @Test
         public void testGetScheduledCountOnRemove() throws Exception {
            long delay = Integer.MAX_VALUE;
            SimpleString address = RandomUtil.randomSimpleString();
            SimpleString queue = RandomUtil.randomSimpleString();
      
            session.createQueue(address, RoutingType.MULTICAST, queue, null, durable);
      
            QueueControl queueControl = createManagementControl(address, queue);
            Assert.assertEquals(0, queueControl.getScheduledCount());
      
            ClientProducer producer = session.createProducer(address);
            ClientMessage message = session.createMessage(durable);
            message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, System.currentTimeMillis() + delay);
            producer.send(message);
      
            queueControl.removeAllMessages();
      
            Assert.assertEquals(0, queueControl.getMessageCount());
      
            session.deleteQueue(queue);
         }
      

      Attachments

        Issue Links

          Activity

            People

              cshannon Christopher L. Shannon
              jbertram Justin Bertram
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: