Examples of waitForMessagesToArrive()


Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        sendMessages("BrokerA", dest, MESSAGE_COUNT);

        // Get message count
        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);

        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);

        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());

        // Check that no message dispatch commands are send over the network
        assertEquals(0, msgDispatchCount.get());
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

        MessageConsumer consumer = createConsumer();
        MessageIdList listener = new MessageIdList();
        consumer.setMessageListener(listener);
        listener.waitForMessagesToArrive(messageCount);
        listener.assertMessagesReceived(messageCount);

    }

    protected void setUp() throws Exception {
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        sendMessages("BrokerC", dest, MESSAGE_COUNT);

        // Get message count
        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);

        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 2);

        assertEquals(MESSAGE_COUNT * 2, msgsB.getMessageCount());
    }

    /**
 
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        // Get message count
        for (int i=1; i<=BROKER_COUNT; i++) {
            for (int j=0; j<CONSUMER_COUNT; j++) {
                MessageIdList msgs = getConsumerMessages("Broker" + i, (MessageConsumer)consumerMap.get("Consumer:" + i + ":" + j));
                msgs.waitForMessagesToArrive(BROKER_COUNT * PRODUCER_COUNT * MESSAGE_COUNT);
                assertEquals(BROKER_COUNT * PRODUCER_COUNT * MESSAGE_COUNT, msgs.getMessageCount());
            }
        }
    }

View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);

        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 2);
        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2);

        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
        assertEquals(MESSAGE_COUNT * 2, msgsB.getMessageCount());
        assertEquals(MESSAGE_COUNT * 2, msgsC.getMessageCount());
    }
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);

        msgsA.waitForMessagesToArrive(MESSAGE_COUNT * 2);
        msgsB.waitForMessagesToArrive(MESSAGE_COUNT);
        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2);

        assertEquals(MESSAGE_COUNT * 2, msgsA.getMessageCount());
        assertEquals(MESSAGE_COUNT, msgsB.getMessageCount());
        assertEquals(MESSAGE_COUNT * 2, msgsC.getMessageCount());
    }
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);

        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
        msgsC.waitForMessagesToArrive(MESSAGE_COUNT);

        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
        assertEquals(MESSAGE_COUNT, msgsC.getMessageCount());
    }
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);

        msgsA.waitForMessagesToArrive(MESSAGE_COUNT * 3);
        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 3);

        assertEquals(MESSAGE_COUNT * 3, msgsA.getMessageCount());
        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
        assertEquals(MESSAGE_COUNT * 3, msgsC.getMessageCount());
    }
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.waitForMessagesToArrive()

        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);

        msgsA.waitForMessagesToArrive(MESSAGE_COUNT * 3);
        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 3);

        assertEquals(MESSAGE_COUNT * 3, msgsA.getMessageCount());
        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
        assertEquals(MESSAGE_COUNT * 3, msgsC.getMessageCount());
    }
View Full Code Here

Examples of org.apache.servicemix.tck.MessageList.waitForMessagesToArrive()

        client.send(createTestMessageExchange(1));
        client.send(createTestMessageExchange(3));
        client.send(createTestMessageExchange(5));
        client.send(createTestMessageExchange(2));
        MessageList ml = receiver.getMessageList();
        ml.waitForMessagesToArrive(numMessages);
        assertEquals("wrong number of messages", numMessages, ml.getMessageCount());
        for (int i = 0; i < numMessages; i++) {
            assertSequenceProperties((NormalizedMessage)ml.getMessages().get(i), i + 1);
        }
        for (int i = 0; i < numMessages; i++) {
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.