Consuming Messages from Oracle AQ in WSO2 Enterprise Integrator 6
Apr 10, 2017 · 2 minute read · CommentsJMSWSO2 EIESBAQOracle
In a project that I am working on we have a requirement to consume messages from a Queue in OracleAQ. We can find some articles on how to do it, but all them require a LDAP in front of AQ. In the customer environment we don’t have that in place. In the documentation we found and in articles the ldap was required to be able to use the JMS transport on WSO2 EI.
We were able to connect to the Oracle AQ using the JMS transport without adding custom code. Let’s see the steps taken.
Add the required jars
Place the required jar files in the [WSO2_EI_HOME]/lib directory:
- aqapi.jar
- jmscommon.jar
- jta.jar
- ojdbc6.jar
Configure the JMS transport receiver
Change the axis2.xml file to add the following configuration:
We defined a transport named oracleaq.
Replace the JDBC URL, Username and Password. The db_url parameter, is a OracleAQ specific parameter.
Create a ProxyService listening to a Queue on Oracle AQ
Create a proxy like below adding the required parameters to use the ConnectionFactory we defined in the previous configuration and the Queue Name:
Basically it is a proxy service using the oracleaq transport that we defined previously with the required service parameters to pull the messages from the queue.
Now if everything was ok, it will log the messages that it is pulling from the Oracle AQ Queue.
I hope you enjoyed.
See you in the next post.