Issue
I'm wondering what is the best way to replace and old ibm batch java application:
In fact , I have a java application which contains basically two classes and can be started using two shell files; a shell to send and message and another one to consume messages present in the Queue.
sendMessage.ksh => start the application and calls send method in the SendMessage class. receiveMessage.ksh => start the application and calls receive method in the ReceiveMessage class.
these two shells are scheduled.
I want to use a spring boot application with MQ V9 but I don't know how to process sending and retrieving messages in the best way ? with REST endpoints ? @jmsListener ?
Thanks.
Solution
For Spring you will be using Spring-JMS, so step 1 will be to familiarise yourself with Spring-JMS.
To use IBM MQ you will need to set the JMS dependency to mq-jms-spring-boot-starter
, for how and which attribute properties to set, see the documentation at https://github.com/ibm-messaging/mq-jms-spring
For usage samples see https://github.com/ibm-messaging/mq-dev-patterns/tree/master/Spring-JMS
The 101 sample has the minimal code needed to get a schedule based producer and consumer running.
Answered By - chughts
Answer Checked By - Senaida (JavaFixing Volunteer)