Tibco Publisher Consumer JmsTemplate Spring Integration

Tibco Publisher Consumer JmsTemplate Spring Integration

As you saw many example of creating Tibco publisher and consumer in previous tutorials. In this example you will see how to create tibco publisher and consumer using Spring JmsTemplate.

Tools needed:

  • Eclipse 4.0 or above
  • JDK 1.8
  • Maven 3.2 or above
  • Tibco version : 5.1.2
  • JMS Version : 1.1

All are included in project. Only you will have to download latest eclipse from here and if you have not already download JDK 8 then download from here.

  • Create maven project name: TibcoSpringJMSTemplate and final structure is below:

2016-03-27 22_50_17-Java EE - Eclipse

  • pom.xml:

  • tibco.properties: Please note that we have separate read and write credentials for publisher and subscriber so I have created separate properties:

  • tibco-subscriber-context.xml:

  • tibco-publisher-context.xml:

  • spring-context.xml:

  • TibcoMessageProducer.java:

  • TibcoMessageConsumer.java:

  • To test this application please user this class:¬†JavaHonkTibcoTestApp.java:

Reference:

Download project: TibcoSpringJMSTemplate

Extra for knowledge: You can also directly map your listener method in spring configuration as below:

As you see above I have included method=”handleMessage” which can be defined inside consumer class as below then you don’t have to implement MessageListener:

Leave a Reply

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