Tibco EMS Publisher Consumer Spring Integration

Tibco EMS Publisher Consumer Spring Integration

TIBCO EMS (Enterprise Message Service) is fully compliant famous Java Message Service (JMS) implementation from TIBCO where they have done some enterprise class sort of enhancements. Most big companies uses havily TIBCO EMS for their enterprise messaging system which makes it easy to write business applications which asynchronously send and receive events and business data.

As JMS (Java Message Service) defines common enterprise messaging API which is designed to efficiently and easily supported through wide range of enterprise messaging products. JMS supports both message queuing and publish-subscribe styles of messaging (topics). In this tutorial you will see how to integrate TIBCO EMS with Spring framework to send and receive data.

  • Enterprise flow diagram:

Tibco EMS Publisher Consumer Spring Integration

  • Tibco Web messaging flow:

2015-08-16 12_04_44-the enterprise backbone tibco - Google Search

  • Precondition: Tibco EMS queues is already created by Tibco adminstrator and proper pemissions given to the users to send and receive message on this queue. If you get an error while sending and receiving data thorugh this queue please contact your Tibco admin to sort out the issue.

Generally Tibco administrator will create two queues which is

  • Input queue — Here you publish your message
  • Output queue — Here you subscribe as consumer to receive the message

Tools needed: As Tibco ESM is fully JSM compliant so you don’t need any other software except setting up queue on Tibco and ofcourse IDE whatever your preference is. Jars list is already there in maven.

  • Create maven project name: TibcoEMS below is complete project structure:

Tibco EMS Publisher Consumer Spring Integration

  • pom.xml:

  • spring-context.xml:

  • tibco-context.xml:

  • messaging.properties: This is very important configuration please don’t forget to replace queue name and user name, password in this file.

  • main.properties: I have created one more properties file in case you need to keep some global properties then please use this file

Interfaces:

  • ITibcoPublisher.java:

  • TradePublisher.java:

Actual implementation classes:

  • ConnectionFactory.java:

  • TibcoPublisher.java: This class only publish message on the queue. Means its just publisher works as send and forget.

  • TibcoPublisherConsumer.java: This class is responsible for publishing and receiving message.

  • MainApplication.java: Main class to test our appliction. This class will load all context and will make call to both publisher and sender and print output on the console:

  • To test this complete application. Right click MainApplication.java as java application and if everything is configured properly you will see below success message on the console:

Tibco EMS Publisher Consumer Spring Integration

  • That’s it. For more information please visit Tibco EMS here

download Download Project:  TibcoEMS

Leave a Reply

Your email address will not be published. Required fields are marked *