...
This sample demonstrates how persistent queues can be created and used in Message Broker using the JMS API. It first introduces a sample JMS client by the name "QueueSender" which is used to send messages to a known, created queue in WSO2 Message Broker, and then introduces a sample JMS client by the name "QueueReceiver" to receive messages and print in the console.
Prerequisites
1. Ensure Ensure that you have ,the following:
- Dependencies located in
...
<PRODUCT_
...
HOME>/client-lib
in class pathMaven dependencies to run the JMS client :
Code Block language html/xml <dependency> <groupId>org.wso2.andes.wso2</groupId> <artifactId>andes-client</artifactId> <version>0.13.wso2v3</version> </dependency> <dependency> <groupId>org.apache.geronimo.specs.wso2</groupId> <artifactId>geronimo-jms_1.1_spec</artifactId> <version>1.1.0.wso2v1</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>slf4j.wso2</groupId> <artifactId>slf4j</artifactId> <version>1.5.10.wso2v1</version> </dependency>
Running the Sample
Prior to running following "QueueSender" class we need to register at least one "QueueReceiver" binding prior sending messages to the queue as you see in $CARBON_HOME/samples/JMSClient. This can be done by one of following ways.
...