Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientConsumer.receiveImmediate()


      log.info("sending second msg");

      producer.send(message);

      ClientMessage received = consumer.receiveImmediate();

      assertNotNull(received);

      assertEquals("giraffe", received.getStringProperty("animal"));
View Full Code Here


      assertNotNull(received);

      assertEquals("giraffe", received.getStringProperty("animal"));

      assertNull(consumer.receiveImmediate());
     
      session.close();
     
      sf.close();
     
View Full Code Here

         message.putStringProperty("animal", "hippo");

         producer.send(message);
      }

      assertNull(consumer.receiveImmediate());

      for (int i = 0; i < QueueImpl.MAX_DELIVERIES_IN_LOOP * 2; i++)
      {
         ClientMessage message = session.createMessage(false);

View Full Code Here

         producer.send(message);
      }

      for (int i = 0; i < QueueImpl.MAX_DELIVERIES_IN_LOOP * 2; i++)
      {
         ClientMessage received = consumer.receiveImmediate();

         assertNotNull(received);

         assertEquals("giraffe", received.getStringProperty("animal"));
      }
View Full Code Here

         assertNotNull(received);

         assertEquals("giraffe", received.getStringProperty("animal"));
      }
     
      assertNull(consumer.receiveImmediate());

      session.close();
     
      sf.close();
     
View Full Code Here

      assertNotNull(received);
     
      assertEquals("giraffe", received.getStringProperty("animal"));
     
      assertNull(consumer1.receiveImmediate());
      assertNull(consumer2.receiveImmediate());
     
      //Create and consume another message that matches the first consumer's filter
      message = session.createMessage(false);

      message.putStringProperty("animal", "giraffe");
View Full Code Here

      assertNotNull(received);
     
      assertEquals("giraffe", received.getStringProperty("animal"));
     
      assertNull(consumer1.receiveImmediate());
      assertNull(consumer2.receiveImmediate());
     
      //Create and consume a message that matches the second consumer's filter
     
      message = session.createMessage(false);
     
View Full Code Here

      assertNotNull(received);
     
      assertEquals("elephant", received.getStringProperty("animal"));
     
      assertNull(consumer1.receiveImmediate());
      assertNull(consumer2.receiveImmediate());
     
      //Create and consume another message that matches the second consumer's filter
     
      message = session.createMessage(false);
     
View Full Code Here

      assertNotNull(received);
     
      assertEquals("elephant", received.getStringProperty("animal"));
     
      assertNull(consumer1.receiveImmediate());
      assertNull(consumer2.receiveImmediate());
     
      session.close();
     
      sf.close();
     
View Full Code Here

      ClientConsumer consumer = session.createConsumer(FailoverTestBase.ADDRESS);

      session.start();

      ClientMessage message = consumer.receiveImmediate();

      Assert.assertNull(message);

      session.close();
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.