In my previous blog, i have demonstrated how to send message in the JMS queue using the OSB JMS adapter.

Now, we are gonna to extend this blog and show you how to get(pull) message from thhe JMS queue using the OSB JMS adapter.

Download the project from here

After this blog, you should have learned to:

How to pull messages from the JMS queue and print the message in the logs

Let’s see the step by step implementation.
1) Create a SB project
2) Create a schema with the below structure
JMS Pull
We have created structure as message will be in above format only.
3) Right click on the Left swim lane,Insert Adapters -> JMS

OSB JMS PULL

4) Enter name and click Next

OSB JMS PULL

5) Select Oracle Weblogic JMS from the drop down and click Next

OSB JMS PULL
6) Select the IntegratedWeblogicServer from the drop down and click Next -> Next


7) Select Consume Message radio button, as we need to pull message
OSB JMS PULL
8) Click Browse button and select the queue from where you want to pull the message. In our case it is TestQueue and leave all the fields as it is and click Next

9) Select Request element of the JMS.xsd schema and click Next

10) Click Next and Finish
Proxy service is ready now.
11) Insert a pipeline. 
12) Select JMS_PULL-concrete.wsdl using the browse WSDL option. Uncheck the Expose as a Proxy Service option and click Finish
13) Wire the JMS_PULL proxy service with Pipeline
14) Double click on the pipeline. Drag and drop the pipeline pair node. Drag and drop the log activity under the Request pipeline
15) Select the expression for the log activity
That’s complete the flow. We are ready to test and see the messages in the logs
Let’s put some messages in the TestQueue by running our previous business service
And see the the logs
You can directly put the message in the TestQueue from the weblogic console.