modules/tests/test-integration/src/test/java/org/ballerinalang/test/service/jms/sample/JMSServiceSampleTestCase.java
/**
     * JMS ActiveMq sample listens to a particular queue and then sends that message to a topic. Another service
     * listens to that particular topic. In this test case, we publish the message to the queue and then listens to
     * the topic, which the same message is passed to. We are checking the content and the message count.
     *
     * @throws InterruptedException Interrupted Exception
     * @throws JMSException JMS Exception
     */
JMS ActiveMq sample listens to a particular queue and then sends that message to a topic. Another service
listens to that particular topic. In this test case, we publish the message to the queue and then listens to
the topic, which the same message is passed to. We are checking the content and the message count.

@throws InterruptedException Interrupted Exception
@throws JMSException JMS Exception
JMS ActiveMq sample listens to a particular queue and then sends that message to a topic . Another service listens to that particular topic . In this test case we publish the message to the queue and then listens to the topic which the same message is passed to . We are checking the content and the message count . @throws InterruptedException Interrupted Exception @throws JMSException JMS Exception
@Test(description = "Test jms service with activemq sample")
    public void testPassingJMSMessageEndToEnd()
            throws InterruptedException, JMSException {
        receiveMessagesFromTopic("ballerinatopic");
        publishMessagesToQueue("ballerinaqueue");
        Thread.sleep(1000);
        Assert.assertEquals(messageCount, 10, "The required number of messages are not delivered to the subscriber "
                + "listening to topic ballerina");
    }
@ Test ( description = "Test jms service with activemq sample" ) public void testPassingJMSMessageEndToEnd ( ) throws InterruptedException , JMSException { receiveMessagesFromTopic ( "ballerinatopic" ) ; publishMessagesToQueue ( "ballerinaqueue" ) ; Thread . sleep ( 1000 ) ; Assert . assertEquals ( messageCount , 10 , "The required number of messages are not delivered to the subscriber " + "listening to topic ballerina" ) ; }
JMS ActiveMq sample listens to a particular queue and then sends that message to a topic.
JMS ActiveMq sample listens to a particular queue and then sends that message to a topic .
// Time for getting the relevant messages as these messages need to go through another queue/