This section describes how to configure WSO2 ESB JMS inbound protocol with ActiveMQ.
Follow the instructions below to set up and configure Apache ActiveMQ as the JMS server:
- Download and set up Apache ActiveMQ. For more information, see Installation Prerequisites
Set up WSO2 ESB. For information on getting the ESB set up, see Getting Started.
ActiveMQ should be up and running before starting the ESB.
- Copy the following client libraries from the
<AMQ_HOME>/libdirectory to the
ActiveMQ 5.8.0 and above
- activeio-core-3.1.4.jar (available in
Earlier version of ActiveMQ
- Next, configure the inbound listener in the ESB.
Configuring the JMS inbound listener
Following is a sample JMS inbound listener configuration:
The sample configuration above does not address the problem of transient failures of the ActiveMQ message broker. For example, if we consider a scenario where the ActiveMQ broker goes down for some reason and comes back up after a while. The ESB will not reconnect to ActiveMQ but instead it will throw errors when requests are sent to the ESB until it is restarted.
In order to tackle this issue you need to specify the following as the
java.naming.provider.url parameter value.
Setting this as the value for the
java.naming.provider.url parameter will make sure that re-connection takes place when ActiveMQ is up and running. The failover prefix is associated with the failover transport of ActiveMQ. For more information, see Failover Transport.
Now you have an instances of ActiveMQ and WSO2 ESB inbound endpoint configured, up and running.