Examples of flushMessages()


Examples of org.activemq.broker.BrokerClientStub.flushMessages()

        message = dispatchMessage(broker, "FOO.XYZ");
        queueB.waitForMessageToArrive();
        assertEquals("queueA", false, queueA.flushMessages().contains(message));
        assertEquals("queueC", false, queueC.flushMessages().contains(message));
        assertEquals("queueD", false, queueD.flushMessages().contains(message));
        assertEquals("queueB", true, queueB.flushMessages().contains(message));

        message = createMessage("BAR.XYZ");
        message.setIntProperty("priority", 123);
        broker.sendMessage(client, message);
View Full Code Here

Examples of org.activemq.broker.BrokerClientStub.flushMessages()

        queueC.waitForMessageToArrive();

        assertEquals("queueA", false, queueA.flushMessages().contains(message));
        assertEquals("queueB", false, queueB.flushMessages().contains(message));
        assertEquals("queueC", true, queueC.flushMessages().contains(message));
        assertEquals("queueD", false, queueD.flushMessages().contains(message));

        message = createMessage("BAR.XYZ");
        message.setStringProperty("x", "ABC");
        broker.sendMessage(client, message);
        queueD.waitForMessageToArrive();
View Full Code Here

Examples of org.activemq.broker.BrokerClientStub.flushMessages()

        queueD.waitForMessageToArrive();

        assertEquals("queueA", false, queueA.flushMessages().contains(message));
        assertEquals("queueB", false, queueB.flushMessages().contains(message));
        assertEquals("queueC", false, queueC.flushMessages().contains(message));
        assertEquals("queueD", true, queueD.flushMessages().contains(message));
    }

    protected void addSubscription(String subject, String selector, BrokerClient client, boolean topic) throws JMSException {
        ConsumerInfo info = createConsumer(subject, selector);
        broker.addMessageConsumer(client, info);
View Full Code Here

Examples of org.activemq.spring.TestingConsumer.flushMessages()

        }

        TestingConsumer consumer = (TestingConsumer) applicationContext.getBean("consumerBean");
        consumer.waitForMessagesToArrive(messageCount);

        List list = consumer.flushMessages();
        assertEquals("Message count: " + list, messageCount, list.size());

        System.out.println("Received all: " + list.size() + " messages");
    }
View Full Code Here

Examples of org.activemq.spring.TestingConsumer.flushMessages()

        TestingConsumer consumer = (TestingConsumer) applicationContext.getBean("echoBean");
        consumer.waitForMessagesToArrive(number);
        long stop = System.currentTimeMillis();
        System.err.println("Time to send/receive " + number + " messages: " + (stop - start) + " ms");
        List list = consumer.flushMessages();
        assertEquals("Message count: " + list, number, list.size());
       
    }
}
View Full Code Here

Examples of org.activemq.spring.TestingConsumer.flushMessages()


        TestingConsumer consumer = (TestingConsumer) applicationContext.getBean("echoBean");
        consumer.waitForMessageToArrive();

        List list = consumer.flushMessages();
        assertEquals("Message count: " + list, 1, list.size());
    }

    /*
        TODO we need a better testing consumer which uses static counters to handle testing of pooled beans
View Full Code Here

Examples of org.activemq.spring.TestingConsumer.flushMessages()

        }

        TestingConsumer consumer = (TestingConsumer) applicationContext.getBean("consumerBean");
        consumer.waitForMessagesToArrive(messageCount);

        List list = consumer.flushMessages();
        assertEquals("Message count: " + list, messageCount, list.size());

        System.out.println("Received all: " + list.size() + " messages");
    }
View Full Code Here

Examples of org.activemq.spring.TestingConsumer.flushMessages()


        TestingConsumer consumer = (TestingConsumer) beanFactory.getBean("echoBean");
        consumer.waitForMessageToArrive();

        List list = consumer.flushMessages();
        assertEquals("Message count: " + list, 1, list.size());
    }

    /*
        TODO we need a better testing consumer which uses static counters to handle testing of pooled beans
View Full Code Here

Examples of org.apache.activemq.spring.ConsumerBean.flushMessages()

            producer.send(session.createTextMessage("message: " + i));
        }

        messageList.assertMessagesArrived(total);
        LOG.info("Received: " + messageList);
        messageList.flushMessages();

        MessageConsumer c2 = session.createConsumer(sendDestination);
        c2.setMessageListener(messageList);
        messageList.assertMessagesArrived(total);
        LOG.info("Q Received: " + messageList);
View Full Code Here

Examples of org.apache.activemq.spring.ConsumerBean.flushMessages()

            producer.send(session.createTextMessage("message: " + i));
        }

        messageList.assertMessagesArrived(total);
        LOG.info("Received: " + messageList);
        messageList.flushMessages();

        MessageConsumer c2 = session.createConsumer(sendDestination);
        c2.setMessageListener(messageList);
        messageList.assertMessagesArrived(total);
        LOG.info("Q Received: " + messageList);
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.