Input Qpid JMS Event Adapter
The configurations of the Apache Qpid input JMS event adapter are explained below. You can configure it with map, XML, JSON, and text input mapping types.
Prerequisites
Follow the steps below to set up the prerequisites before starting the configuration.
Install JMS-Qpid Broker and JMS-Qpid Client.
- Add the following broker-specific JAR files to
<PRODUCT_HOME>/repository/components/lib/
directory.<ACTIVEMQ_HOME>/lib/geronimo-jms_1.1_spec-1.0.jar
<QPID-CLIENT_HOME>/lib/qpid-client-xxx.jar
<QPID-CLIENT_HOME>/lib/qpid-common-xxx.jar
Configuring the Qpid input JMS event adapter
You can configure the Apache Qpid JMS input event adapter either using the management console or using a configuration file.
Configure using the management console
Follow the instructions below to configure Qpid input JMS event adapter using the management console. This deploys the event adapter in the <PRODUCT_HOME>
/
repository/
deployment/
server/
inputeventadaptors/
directory.
- Log in to product's management console, and click Configure.
- Click Input Event Adaptors in the Event Processor Configs menu, and then click Add Input Event Adaptor.
Enter details as shown in the below example.
Refer the<PRODUCT_HOME>/reposiyory/conf/
file. This example uses Topic Connection Factory. Therefore, the following entry points the default Qpid host to localhost and port to 5672:jndi.properties
connectionfactory.TopicConnectionFactory = amqp:
//admin:admin@clientid/test?brokerlist='tcp://localhost:5672'
- Click Add Event Adaptor.
Configure using a configuration file
Follow the instructions below to configure ActiveMQ input JMS event adapter using a configuration file.
Create an XML file with the following Qpid input event adapter configurations. Input event adapter implementation must start with
<inputEventAdaptor>
as the root element.<inputEventAdaptor name="QpidJmsInputAdaptor" statistics="disable" trace="disable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager"> <property name="java.naming.provider.url">repository/conf/jndi.properties</property> <property name="transport.jms.SubscriptionDurable">false</property> <property name="java.naming.factory.initial">org.apache.qpid.jndi.PropertiesFileInitialContextFactory</property> <property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property> <property name="transport.jms.DestinationType">topic</property> </inputEventAdaptor>
Add the XML file to the
<PRODUCT_HOME>/repository/deployment/server/inputeventadaptors/
directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy to/from the server.
Configuring input JMS event adapter message properties