This section describes how to configure the WSO2 ESB's JMS transport with ActiveMQ.
Table of Contents | ||
---|---|---|
|
Setting up WSO2 ESB and ActiveMQ
Follow the instructions below to set up and configure.
1. Download, set up and start Apache ActiveMQ.
2. Follow the Getting Started and set up WSO2 ESB.
Info |
---|
ActiveMQ should be up and running before starting the ESB. |
...
ActiveMQ 5.8.0 and above
...
This section describes how to configure the WSO2 ESB's JMS transport with ActiveMQ.
Table of Contents | ||
---|---|---|
|
Setting up WSO2 ESB and ActiveMQ
Follow the instructions below to set up and configure.
1. Download, set up and start Apache ActiveMQ.
2. Follow the Getting Started and set up WSO2 ESB.
Info |
---|
ActiveMQ should be up and running before starting the ESB. |
3. Copy the following client libraries from the Anchor clientLibs clientLibs <AMQ_HOME>/lib
directory to the <
ESB_HOME>/repository/components/lib
directory.
ActiveMQ 5.8.0 and above
- activemq-broker-5.8.0.jar
- activemq-client-5.8.0.jar
- activemq-kahadb-store-5.8.0.jar
- geronimo-jms_1.1_spec-1.1.1.jar
- geronimo-j2ee-management_1.1_spec-1.0.1.jar
- geronimo-jta_1.0.1B_spec-1.0.1.jar
- hawtbuf-1.9.jar
- Slf4j-api-1.6.6.jar
- activeio-core-3.1.4.jar (available in
<AMQ_HOME>/lib/optional
folder)
Earlier version of ActiveMQ
activemq-core-5.5.1.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
geronimo-jms_1.1_spec-1.
01.1.jar
Info | ||
---|---|---|
| ||
If you are using ActiveMQ version 5.8.0 or later, copy hawtbuf-1.2.jar to < ESB_HOME>/repository/components/lib directory . |
Earlier version of ActiveMQ
activemq-core-5.5.1.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
geronimo-jms_1.1_spec-1.1.1.jar
4. Next, configure transport listeners and senders in ESB.4. Next, configure transport listeners and senders in ESB.
Note |
---|
When configuring JMS with ActiveMQ, you can append ActiveMQ-specific properties to the value of the
|
AnchorJMSListener JMSListener
Setting up the JMS Listener
JMSListener | |
JMSListener |
To enable the JMS transport listener, un-comment the following listener configuration related to ActiveMQ in <ESB_HOME>/repository/conf/axis2/axis2.xml file.
Code Block | ||
---|---|---|
| ||
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener"> <parameter name="myTopicConnectionFactory" locked="false"> <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter> <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter> <parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter> </parameter> <parameter name="myQueueConnectionFactory" locked="false"> <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter> <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter> <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter> </parameter> <parameter name="default" locked="false"> <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter> <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter> <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter> </parameter> </transportReceiver> |
AnchorJMSSender JMSSender
Setting up the JMS Sender
JMSSender | |
JMSSender |
To enable the JMS transport sender, un-comment the following configuration in <ESB_HOME>/repository/conf/axis2/axis2.xml file.
Code Block | ||
---|---|---|
| ||
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/> |
Info |
---|
For details on the JMS configuration parameters used in the code segments above, see JMS Connection Factory Parameters. |
...