. You can configure it with XML, map, JSON, and text input mapping types.
Follow the steps below to set up the prerequisites before starting the configuration.
Install Apache ActiveMQ JMS.
This guide uses ActiveMQ versions 5.7.0 or below. If you want to use a later version, for instructions on the necessary changes to the configuration steps, go to Apache ActiveMQ Documentation.
Configure WSO2 CEP by adding relevant libraries to support JMS transport.
- Start the ActiveMQ JMS server.
Creating an ActiveMQ JMS event receiver
For instructions on creating an ActiveMQ JMS event receiver, see Configuring Event Receivers.
Configuring adapter properties
After entering the above adapter properties, select the Event Stream to which you want to map the incoming events, and the Message Format which you want to apply on the receiving events. Also, click Advanced to define custom input mappings based on the Message Format you selected. For more information on custom input mapping types, see Input Mapping Types.
You can also define the respective adapter properties of the event receiver based on the transport type within the
<from> element of the event receiver configuration in the
<PRODUCT_HOME>/repository/deployment/server/eventreceivers/ directory as follows.
The above adapter properties are described below.
|Adapter Property||Description||Configuration file property||Example|
A string of characters to denote a valid name of a JMS topic to subscribe to, or named queue to use when WSO2 CEP/DAS sends and receives messages.
JNDI Initial Context Factory Class
JNDI initial context factory class. The class must implement the
JNDI Provider URL
URL of the JNDI provider.
The JMS connection password
A valid password for the JMS connection.
The JMS connection username
A valid username for the JMS connection.
Connection Factory JNDI Name
The JNDI name of the connection factory.
The sort order for messages that arrive on a specific destination.
Enable Durable Subscription
Whether the subscription is durable or not.
Durable Subscriber Name
A string of characters to denote a valid name of the durable subscriber. (It enables durable subscription if you add any value here).
Valid property and value pairs to denote Axis2 JMS properties (e.g. "property1: value1, property2: value2")
For more information on Axis2 JMS properties, go to Apache AXIS2 Transports Documentation.
For more information on ActiveMQ event receiver type, see the following samples.