This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

If your system has more than one existing brokers, it will be required to configure the JMS transport with multiple brokers. In such situations, each transport receiver should have a separate name. The following example illustrates how to configure the transport with both ActiveMQ and SwiftMQ as JMS brokers

  1. Configure the JMS transport with ActiveMQ by following the procedure in Configure with Active MQ. Enter the value for the transport receiver as jmsActiveMQ instead of jms as shown below.

     <transportReceiver name="jmsActiveMQ" class="org.apache.axis2.transport.jms.JMSListener">
  2.  Similarly, enter another configuration following the procedure in Configure with SwiftMQ. Enter the value for the transport receiver as jmsSwiftMQ instead of jms as shown below.

    <transportReceiver name="jmsSwiftMQ" class="org.apache.axis2.transport.jms.JMSListener">

     The configuration should look as follows.

    <!-- ActiveMQ -->
    <transportReceiver name="jmsActiveMQ" class="org.apache.axis2.transport.jms.JMSListener">
    <parameter name="T1ActivemQTopicConnectionFactory" 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="T1DataJMSCachingConnectionFactory" 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>
     
    <!-- SwiftMQ -->
    <transportReceiver name="jmsSwiftMQ" class="org.apache.axis2.transport.jms.JMSListener">
    <parameter name="T1SwiftTopicConnectionFactory" locked="false">
    <parameter name="java.naming.factory.initial" locked="false">com.swiftmq.jndi.InitialContextFactoryImpl</parameter>
    <parameter name="java.naming.provider.url" locked="false">smqp://</parameter>
    <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
    <parameter name="transport.jms.JMSSpecVersion" locked="false">1.0</parameter>
    <parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
    </parameter>
    <parameter name="T1SwiftQueueConnectionFactory" locked="false">
    <parameter name="java.naming.factory.initial" locked="false">com.swiftmq.jndi.InitialContextFactoryImpl</parameter>
    <parameter name="java.naming.provider.url" locked="false">smqp://</parameter>
    <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
    <parameter name="transport.jms.JMSSpecVersion" locked="false">1.0</parameter>
    <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
    </parameter>
    <parameter name="default" locked="false">
    <parameter name="java.naming.factory.initial" locked="false">com.swiftmq.jndi.InitialContextFactoryImpl</parameter>
    <parameter name="java.naming.provider.url" locked="false">smqp://internalip:host/type=com.swiftmq.net.JSSESocketFactory</parameter>
    <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
    <parameter name="transport.jms.JMSSpecVersion" locked="false">1.0</parameter>
    <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
    </parameter>
    </transportReceiver> 
    This content was added to answer question "How can I connect WSO2 ESB to multiple JMS brokers?" in the /wiki/spaces/FAQ/pages/37781616 FAQ page.
  • No labels