Hi! Hope everyone id doing well. Today, I'm going to show you how to consume a message from JMS queue in Oracle SOA 12c. To consume a message from the queue, first a message should be published to JMS queue. To publish a message, click here to navigate to my previous post that shows how to push a request to queue.
1. Create a SOA Project.
2. Drag and drop a JMS adapter to the Exposed Services swim lane. Give it a proper name or leave default and click Next.
Select the JMS Provider and click Next.
Select your connection and click Next.
Leave the default interface as specified later and click Next.
Select the Operation Type as Consume Message. Click Next.
Specify the Destination Name as the queue where your message lies and select the correct JNDI name.
Select the schema input message. Here, I copied the schema that I used in Publish message jms service. Click here to navigate to that publish message post.
Click Finish in the next screen.
3. Drag and drop a BPEL with Interface Type as "No Service".
Wire the BPEL to JMS Service.
Edit the BPEL and drag and drop a Receive activity. Check the check box "Create Instance". Select the Partner link as JMS Service and create a variable by clicking on green plus(+) icon. Click Apply and click OK.
As we just want to consume message, we've added only receive activity. If you want to insert the consumed data into a table, you can use a database adapter and map the values to insert the values.
Now, deploy your service. Click on the Flow Instances and Click on the Search button to see the created instances. Click on the instance id to see the flow.
Click on the ConsumeMsgBPELProcess and open Receive activity to see the consumed message.
Hope this post helped you. If you have any queries, hit them in the comment section below. Happy learning. Cheers!!