Examples of listMessages()


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

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

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

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

      // delete 1st message
      boolean deleted = queueControl.removeMessage(messageID);
View Full Code Here

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

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

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

      // delete 1st message
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");

      boolean priorityChanged = queueControl.changeMessagePriority(messageID, newPriority);
      Assert.assertTrue(priorityChanged);
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.