Examples of removeMessages()


Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      QueueControl queueControl = createManagementControl(address, queue);
      Assert.assertEquals(2, queueControl.getMessageCount());

      // removed matching messages to otherQueue
      int removedMatchedMessagesCount = queueControl.removeMessages(key + " =" + matchingValue);
      Assert.assertEquals(1, removedMatchedMessagesCount);
      Assert.assertEquals(1, queueControl.getMessageCount());

      // consume the unmatched message from queue
      ClientConsumer consumer = session.createConsumer(queue);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      QueueControl queueControl = createManagementControl(address, queue);
      Assert.assertEquals(2, queueControl.getMessageCount());

      // removed matching messages to otherQueue
      int removedMatchedMessagesCount = queueControl.removeMessages(null);
      Assert.assertEquals(2, removedMatchedMessagesCount);
      Assert.assertEquals(0, queueControl.getMessageCount());

      session.deleteQueue(queue);
   }
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      QueueControl queueControl = createManagementControl(address, queue);
      Assert.assertEquals(2, queueControl.getMessageCount());

      // removed matching messages to otherQueue
      int removedMatchedMessagesCount = queueControl.removeMessages("");
      Assert.assertEquals(2, removedMatchedMessagesCount);
      Assert.assertEquals(0, queueControl.getMessageCount());

      session.deleteQueue(queue);
   }
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      for (String queue : queues)
      {
         QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue);
         if (coreQueueControl != null)
         {
            count += coreQueueControl.removeMessages(filter);
         }
      }

      return count;
   }
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

                return control.removeMessage(id.asLong());
            }

            @Override
            public int removeMessages(String filter) throws Exception {
                return control.removeMessages(filter);
            }

            @Override
            public int expireMessages(String filter) throws Exception {
                return control.expireMessages(filter);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      for (String queue : queues)
      {
         QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue);
         if (coreQueueControl != null)
         {
            count += coreQueueControl.removeMessages(filter);
         }
      }

      return count;
   }
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      for (String queue : queues)
      {
         QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue);
         if (coreQueueControl != null)
         {
            count += coreQueueControl.removeMessages(filter);
         }
      }

      return count;
   }
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.removeMessages()

      for (String queue : queues)
      {
         QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue);
         if (coreQueueControl != null)
         {
            count += coreQueueControl.removeMessages(filter);
         }
      }

      return count;
   }
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

      JMSUtil.sendMessages(queue, 2);

      Assert.assertEquals(2, queueControl.getMessageCount());

      queueControl.removeMessages(null);

      Assert.assertEquals(0, queueControl.getMessageCount());

      Connection connection = JMSUtil.createConnection(InVMConnectorFactory.class.getName());
      connection.start();
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSQueueControl.removeMessages()

      message.setStringProperty("foo", "baz");
      producer.send(message);

      Assert.assertEquals(2, queueControl.getMessageCount());

      int removedMatchingMessagesCount = queueControl.removeMessages("foo = 'bar'");
      Assert.assertEquals(1, removedMatchingMessagesCount);

      Assert.assertEquals(1, queueControl.getMessageCount());

      conn.start();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.