Raj GT
Raj GT

Reputation: 25

How to create generic JMS messaging to active mq and IBM mq using spring batch

I have a requirement to convert different text formats into XML object and send to IBM MQ. But for testing purpose I am planning to use Active mq. But my final integration will be IBM MQ. How to make JMS template to be more generic to send across to two different message queuing platforms ?? What would be the best way make JMS as independent module??

Upvotes: 1

Views: 5359

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121552

I suggest you to take a look in to Spring Boot and its JMS auto-configuration.

All what you need are application.properties to be configured externally.

spring.activemq.broker-url=tcp://192.168.1.210:9876

For ActiveMQ or:

spring.jms.jndi-name=java:/MyConnectionFactory

For IBM WebSphere MQ JMS adapter.

By the way you can find Spring Batch auto-configuration in Boot as well.

Upvotes: 1

Related Questions