Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section describes how to configure the WSO2 ESB's JMS transport with WSO2 Message Broker (MB). It facilitates message brokering needs of the ESB and helps implement the store and forward messaging pattern.

...

2. WSO2 MB uses a Cassandra server that is bundled with it by default for storage. As the Message Broker's port offset is changed by 1 above, change the Cassandra port accordingly by opening <MB_HOME>/repository/conf/advanced/qpid-virtualhosts.xml file and increasing the port by 1. In this case, it will be 9161 (Default 9160 + 1).

...

titleNote

. However, in a production setup, using an external Cassandra server that is capable of handling large volumes of queues is recommended. When an external Cassandra server is used, point the Message Broker to it by editing the value of the <connectionString> accordingly. For information on setting up WSO2 MB with an external server, see the Deployment Guide in the Message Broker Documentation.

Code Block
languagehtml/xml
<store>
   <class>org.wso2.andes.server.store.CassandraMessageStore</class>   
   <username>admin</username>  
   <password>admin</password>
   <cluster>ClusterOne</cluster>   
   <idGenerator>org.wso2.andes.server.cluster.coordination.TimeStampBasedMessageIdGenerator</idGenerator>   
   <connectionString>localhost:9161</connectionString>
</store>

...

3. The default message batch size for browser subscriptions of Message Broker 2.0.1 is a very low value like 2. Increase is 200. If needed, you can increase it to a larger value by adding setting the following parameter as an immediate child of the root <broker> element to property in the <MB_HOME>/repository/conf/advanced/qpid-config.xml file.

...

Code Block
languagehtml/xml
<!-- uncomment this and configure to use connection pools for sending messages>
<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.

...

  • Use carbon as the virtualhost.
  • Comment out the topic, as it is not needed. But, in order to avoid the error javax.naming.NameNotFoundException: TopicConnectionFactory during server startup, also point TopicConnectionFactory to the Message Broker.
    Anchor
    jndi
    jndi
     

For example:

Code Block
# register some connection factories
# connectionfactory.[jndiname] = [ConnectionURL]
connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'
connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'

...