Examples of listMessages()


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

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

      // the message IDs are set on the server
      Map<String, Object>[] messages = queueControl.listMessages(null);
      Assert.assertEquals(1, messages.length);
      long messageID = (Long)messages[0].get("messageID");

      try
      {
View Full Code Here

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

      if (coreQueueControl == null)
      {
         throw new IllegalArgumentException("No subscriptions with name " + queueName);
      }

      Map<String, Object>[] coreMessages = coreQueueControl.listMessages(null);

      Map<String, Object>[] jmsMessages = new Map[coreMessages.length];

      int i = 0;
View Full Code Here

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

      if (coreQueueControl == null)
      {
         throw new IllegalArgumentException("No subscriptions with name " + queueName + " for clientID " + clientID);
      }
      String filter = JMSTopicControlImpl.createFilterFromJMSSelector(filterStr);
      return coreQueueControl.listMessages(filter).length;
   }

   public int removeMessages(final String filterStr) throws Exception
   {
      String filter = JMSTopicControlImpl.createFilterFromJMSSelector(filterStr);
View Full Code Here

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

      producer.send(matchingMessage);
      ClientMessage unmatchingMessage = session.createMessage(false);
      unmatchingMessage.putLongProperty(key, unmatchingValue);
      producer.send(unmatchingMessage);

      Map<String, Object>[] messages = queueControl.listMessages(filter);
      Assert.assertEquals(1, messages.length);
      Assert.assertEquals(matchingValue, messages[0].get("key"));

      ManagementTestBase.consumeMessages(2, session, queue);
View Full Code Here

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

      Assert.assertEquals(1, messages.length);
      Assert.assertEquals(matchingValue, messages[0].get("key"));

      ManagementTestBase.consumeMessages(2, session, queue);

      messages = queueControl.listMessages(filter);
      Assert.assertEquals(0, messages.length);

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

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

      ClientProducer producer = session.createProducer(address);
      producer.send(session.createMessage(false));
      producer.send(session.createMessage(false));

      Map<String, Object>[] messages = queueControl.listMessages(null);
      Assert.assertEquals(2, messages.length);

      ManagementTestBase.consumeMessages(2, session, queue);

      messages = queueControl.listMessages(null);
View Full Code Here

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

      Map<String, Object>[] messages = queueControl.listMessages(null);
      Assert.assertEquals(2, messages.length);

      ManagementTestBase.consumeMessages(2, session, queue);

      messages = queueControl.listMessages(null);
      Assert.assertEquals(0, messages.length);

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

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

      ClientProducer producer = session.createProducer(address);
      producer.send(session.createMessage(false));
      producer.send(session.createMessage(false));

      Map<String, Object>[] messages = queueControl.listMessages("");
      Assert.assertEquals(2, messages.length);

      ManagementTestBase.consumeMessages(2, session, queue);

      messages = queueControl.listMessages("");
View Full Code Here

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

      Map<String, Object>[] messages = queueControl.listMessages("");
      Assert.assertEquals(2, messages.length);

      ManagementTestBase.consumeMessages(2, session, queue);

      messages = queueControl.listMessages("");
      Assert.assertEquals(0, messages.length);

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

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

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

      // the message IDs are set on the server
      Map<String, Object>[] messages = queueControl.listMessages(null);
      Assert.assertEquals(1, messages.length);
      long messageID = (Long)messages[0].get("messageID");

      // moved all messages to unknown queue
      try
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.