Versions Compared

Key

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

This section describes how to configure WSO2 ESB JMS inbound protocol with ActiveMQ.

...

  1. Download and set up Apache ActiveMQ. For more information, see Installation Prerequisites
  2. Set up WSO2 ESB. For information on getting the ESB set up, see Getting Started.

    Info
    titleNote

    ActiveMQ should be up and running before starting the ESB.

  3. Copy the following client libraries from the <AMQ_HOME>/lib directory to the < ESB_HOME>/repository/components/lib directory.

    For ActiveMQ 5.8.0 and above

    • activemq-broker-5.8.0.jar
    • activemq-client-5.8.0.jar
    • geronimo-jms_1.1_spec-1.1.1.jar
    • geronimo-j2ee-management_1.1_spec-1.0.1.jar
    Info
    titleNote

    If you are using ActiveMQ version 5.8.0 or later, copy hawtbuf-1.2.jar to the <ESB_HOME>/repository/components/lib directory.

    For earlier versions 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 the inbound listener in the ESB.

Configuring the JMS inbound listener

...

Info
titleNote
For details on the JMS configuration parameters used in the sample configuration above, see JMS Connection Factory Parameters.
Info

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.

failover:tcp://localhost:61616

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.

...