Sending a message to a JMS queue/topic
In this recipe, we will create a Business Service which sends a message to either a JMS queue or to a JMS topic. Since writing to a queue and topic is very similar from the business service perspective, we decided to combine it into one single recipe. We will use and configure the JMS Transport provided by the Oracle Service Bus.
Getting ready
For this recipe, we will use the DestinationQueue or the DestinationTopic from the OSB Cookbook standard environment and implement a business service to send messages to the queue/topic. We will not implement the proxy service in this recipe and instead test the business service directly on the OSB console.
How to do it...
First let's create the JMSProducer business service which sends the messages to the DestinationQueue. In the There's more section we will show the necessary changes to send a message to the JMS topic. In Eclipse OEPE, perform the following steps:
Create a new OSB project
writing-to-a-jms-queue
and...