Examples of receiveImmediate()


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

         ClientConsumer consumer = sessionConsumer.createConsumer(PagingTest.ADDRESS);
         for (int msgCount = 0; msgCount < numberOfMessages; msgCount++)
         {
            log.info("Received " + msgCount);
            msgReceived++;
            ClientMessage msg = consumer.receiveImmediate();
            if (msg == null)
            {
               log.info("It's null. leaving now");
               sessionConsumer.commit();
               fail("Didn't receive a message");
View Full Code Here

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

         ClientConsumer consumer = sessionConsumer.createConsumer(PagingTest.ADDRESS);
         for (int msgCount = 0; msgCount < numberOfMessages; msgCount++)
         {
            log.info("Received " + msgCount);
            msgReceived++;
            ClientMessage msg = consumer.receiveImmediate();
            if (msg == null)
            {
               log.info("It's null. leaving now");
               sessionConsumer.commit();
               fail("Didn't receive a message");
View Full Code Here

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

         consumer = sessionConsumer.createConsumer(PagingTest.ADDRESS);
         for (int msgCount = 0; msgCount < numberOfMessages; msgCount++)
         {
            log.info("Received " + msgCount);
            msgReceived++;
            ClientMessage msg = consumer.receiveImmediate();
            if (msg == null)
            {
               log.info("It's null. leaving now");
               sessionConsumer.commit();
               fail("Didn't receive a message");
View Full Code Here

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

                  ClientMessage msg = consumer.receive(PagingTest.RECEIVE_TIMEOUT);
                  msg.acknowledge();
                  Assert.assertNotNull(msg);
               }

               Assert.assertNull(consumer.receiveImmediate());
               consumer.close();
            }

            Integer messageID = (Integer)message.getObjectProperty(new SimpleString("id"));
            Assert.assertNotNull(messageID);
View Full Code Here

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

            producerTransacted.send(message);
         }

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

         Assert.assertNull(consumer.receiveImmediate());

         sessionTransacted.commit();

         sessionTransacted.close();
View Full Code Here

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

            Assert.assertEquals("message received out of order", messageID.intValue(), i);

            message.acknowledge();
         }

         Assert.assertNull(consumer.receiveImmediate());

         consumer.close();

         session.close();
View Full Code Here

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

                  assertEquals(j, msg.getIntProperty("id").intValue());
                  assertFalse(msg.getBooleanProperty("new"));
                  Assert.assertNotNull(msg);
               }

               ClientMessage msgReceived = consumer.receiveImmediate();

               if (msgReceived != null)
               {
                  System.out.println("new = " + msgReceived.getBooleanProperty("new") +
                                     " id = " +
View Full Code Here

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

            producerTransacted.send(message);
         }

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

         Assert.assertNull(consumer.receiveImmediate());

         sessionTransacted.commit();

         sessionTransacted.close();
View Full Code Here

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

            Assert.assertEquals("message received out of order", i, messageID.intValue());

            message.acknowledge();
         }

         Assert.assertNull(consumer.receiveImmediate());

         consumer.close();

         session.close();
View Full Code Here

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

         }
         consumerNonTX.close();

         ClientConsumer consumer = sessionNonTX.createConsumer(PagingTest.ADDRESS);

         Assert.assertNull(consumer.receiveImmediate());

         sessionTransacted.commit();

         sessionTransacted.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.