WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
Skip to end of metadata
Go to start of metadata

WSO2 Message Broker (MB) JMS output event adapter is used to publish events in mapXMLJSON, and text formats via JMS transport.


Follow the steps below to set up the prerequisites before starting the configuration.

  1. Download and install WSO2 Message Broker. For instructions on WSO2 MB, go to Message Broker documentation.

  2. Configure WSO2 CEP by adding relevant libraries to support JMS transport.

  3. Register a connection factory in the <PRODUCT_HOME>/repository/conf/ file. For example, if the connection factory JNDI name is TopicConnectionFactory, it will point the default WSO2 MB host to localhost and port to 5672 as shown below. Furthermore, add the topics to be sent to the WSO2 MB in the format: topic.{topicName} = {topicName}

    topic.topicMap = topicMap
    topic.topicXML = topicXML
  4. Start WSO2 MB and start the WSO2 CEP/DAS server with an off-port since the WSO2 MB has started in the default port. For instructions, see Starting sample CEP configurations and append - DportOffset=1 -Dqpid.dest_syntax=BURL to the command.

Creating a WSO2 MB JMS event publisher

For instructions on creating a WSO2 MB JMS event publisher, see Configuring CEP to Create Alerts.

Configuring adapter properties

Specify the Static and Dynamic Adapter Properties, when creating a WSO2 MB JMS event publisher using the management console as shown below.

WSO2 MB publisher

After entering the above adapter properties, select the Message Format which you want to apply on the published events. Also, click Advanced to define custom output mappings based on the Message Format you selected. For more information on custom output mapping types, see Output Mapping Types.

You can also d efine the respective adapter properties of the event publisher based on the transport type within the <to> element of the event publisher configuration in the <PRODUCT_HOME>/repository/deployment/server/eventpublishers/ directory as follows.

<eventPublisher name="WSO2MBJMSOutputEventAdapter" statistics="disable" trace="disable" xmlns="">
  <to eventAdapterType="jms">
    <property name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</property>
    <property name="java.naming.provider.url">repository/conf/</property>
    <property name="transport.jms.UserName">jms-user</property>
    <property encrypted="true" name="transport.jms.Password">JP4yDiEh6HogOEjJzQQwHaJFIWZlnJTzaERl4eYrwukNeypm36R+odMkaN9b2q4H9jBQsRV+mhcT1wQVnBpEZn4a+SuFuLKh3NihDEgww6R1tZVo8p1D6TUKvSHXYEpwSOgKrkOmdaFEOQOjfdhfK3Hrnjkz/MYPYQknrLK5MIY=</property>
    <property name="transport.jms.DestinationType">topic</property>
    <property name="transport.jms.Header">header_name1:header_value1,header_name2:header_value2</property>
    <property name="transport.jms.Destination">test_topic</property>
    <property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property>

The above adapter properties are described below.

Static adapter properties 

Adapter Property
Configuration file propertyExample
JNDI Initial Context Factory Class The JNDI initial context factory class. The class must implement the java.naming.spi.InitialContextFactory interface


JNDI Provider URL URL of the JNDI provider


Username Valid username for the JMS connection
Password Valid password for the JMS connection
Connection Factory JNDI Name The JNDI name of the connection factory
Destination Type The sort order for messages that arrive on a specific destination
Destination The topic or queue to which WSO2 CEP sends messages by publishing.

Dynamic adapter properties 

Adapter PropertyDescriptionConfiguration file propertyExample
Header Define transport headers as a valid header name in a header value pair format transport.jms.Header

Related samples

For more information on WSO2 Message Broker event publisher type, see the following sample.

  • No labels