Connecting to Tibco EMS in Mule using JMS Connector


In this article, I will brief about messaging interfaces using JMS connector in Mule. We will be connecting to Tibco EMS Server.

Queues and Topics:

  • Point-to-Point(Queues): Message delivered to one recipient.
  • Publish Subscribe(topics): Message delivered to multiple recipients. 
Let create a new mule project and add the following references to the projects as shown below.
Lets not  create a simple flow to read a message from the queue and write it to file system. Drag and drop the JMS connector and then file activity as shown and then configure the JMS connector as shown below,
Configure the connector configurations as shown below,
Configure the JMS to poll message from queue and then file activity as shown; Run the mule app to verify the behavior. Make sure Tibco EMS Server is up and running.
Using GEMS tools, we would connect to the EMS server and then push a message to tibcodj.queue as shown.
Once the message is available in the queue, as the mule flow is polling to the same queue, this message would be picked up and sent to file system.
This flow would pick up all the message that arrives at this queue. Lets add a JMS filter to select a type of message based on the specific property of the message. From GEMS tool, lets a custom property to the message as shown below, we add a ServiceType Property and provide as Cab.
In the message flow, go to the configuration tab and add JMS Selector filter as shown and run the project to verify the behavior.
Now lets connect to a Topics using JMS connector, as earlier we would configure another JMS connector to connect to Topic.

Here is the simple, which polls on a file directory and then push the text available in the file to a EMS topic. Flow configurations are shown below,
Run the project and push a message from GEMS to a queue,
1st flow would create a dat file in the directory and as 2nd flows polls this same directory the information in file is picked up and processed to the Tibco EMS topic, as  shown below.
Now lets try to add a subscriber flow, as shown
Now in the 2nd flow i.e topic publisher lets add a message property to message using message properties and sends to the EMS topic and the subscriber i.e 3 flow, subscribes to message based on the property value as shown below,

No comments:

Post a Comment

Note: only a member of this blog may post a comment.