Versions Compared

Key

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

Qpid JMS output event adapter Qpid JMS event publisher is used to publish events in map, XML, JSON, and text formats via JMS transport.

Table of Contents
maxLevel3

Prerequisites

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

  1. Install Qpid JMS Broker and Qpid JMS Client.

    Add the following Qpid JMS-specific JAR files to  <CEP_HOME>/repository/components/lib/ directory.  
  2. <ACTIVEMQ_HOME>/lib/geronimo-jms_1.1_spec-1.0.jar   
  3. <QPID-CLIENT_HOME>/lib/qpid-client-xxx.jar
  4. <QPID-CLIENT_HOME>/lib/qpid-common-xxx.jar
  5. Configure WSO2 CEP by adding relevant jars to support JMS transport.
  6. Register a connection factory in the <CEP<PRODUCT_HOME>/repository/conf/jndi.properties. For example, if the connection factory JNDI name is TopicConnectionFactory, it will point the default Qpid host to localhost and port to 5672 as shown below. Furthermore, add the topics to be sent to the Qpid broker in the format: topic.{topicName} = {topicName}

    Code Block
    languagetext
    connectionfactory.TopicConnectionFactory=amqp://admin:admin@clientid/default?brokerlist='tcp://localhost:5672'
    topic.topicMap = topicMap
    topic.topicJSON = topicJSON
  7. Start Qpid Broker, and then start the product. 

 

Creating a Qpid

...

JMS event

...

publisher

 

For instructions on creating a Qpid JMS output event adapterpublisher, see Publishing Events .  

 

Configuring adapter properties

...

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

...

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

...

The above adapter properties are described below.

Static adapter properties 

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

org.apache.qpid.jndi.PropertiesFileInitialContextFactory

JNDI Provider URL URL of the JNDI provider
java.naming.provider.url

repository/conf/jndi.properties

Username Valid username for the JMS connection
transport.jms.UserName
jms-user
Password Valid password for the JMS connection
transport.jms.Password
jms-password
Connection Factory JNDI Name The JNDI name of the connection factory
transport.jms.ConnectionFactoryJNDIName
TopicConnectionFactory
Destination Type The sort order for messages that arrive on a specific destination
transport.jms.DestinationType
topic/queue
Destination The topic or queue to which WSO2 CEP/DAS sends messages by publishing.
transport.jms.Destination
test_topic

Dynamic adapter properties 

Adapter PropertyDescriptionConfiguration file propertyExample
HeaderDefine Transport Headers transport headers as a valid header name in a header value pair format  transport.jms.Header header_name1:header_value1,header_name2:header_value2 

Related samples

For more information on Qpid event publisher type, see the following sample.