One Business Service for Multiple JMS Destinations

In OSB we can create a single business service to post messages to different JMS destinations. Below steps explain how we can configure the same

1. Create a business service to send message to any JMS destination as below

                 OSB for JMS destination - 1

2. Create an Xquery which will have the URLs of correct JMS destinations, shown as below

<JMSURLS>
    <JMSURL_1>jms:///OSBFactory/JMSDest1</JMSURL_1>
    <JMSURL_2>jms:///OSBFactory/JMSDest2</JMSURL_2>
    <JMSURL_3>jms:///OSBFactory/JMSDest3</JMSURL_3>
</JMSURLS>

3. Create a proxy service to publish message to the Business service created above
    a. Inside Publish Action assign Xquery created to a variable JmsUrls
    b. Insert Routing Options inside publish action and set URI to $JmsUrls//JMSURL_2/text()

OSB for JMS destination - 2

4. Save all and execute the proxy service, this should publish the message to JMSDest2 queue

This can help to reduce the number of artifacts created to publish message to queue and is easier to manage, as jms urls are specified in one xquery

Cheers!!!
Prabodh

comments powered by Disqus