Fahad Shakeel
Fahad Shakeel

Reputation: 94

How to generate WebSphere MQ Message from Spring JMS?

I need to produce queue message in WebSphere MQ message format. By default spring produced the message in JMS format. I have googled and came to know that WebSphere MQ Message format contains MQMD and RFH2 header. No idea how to generate these two from Spring.

Upvotes: 2

Views: 1689

Answers (1)

Daniel Steinmann
Daniel Steinmann

Reputation: 2199

Where Tomcat context.xml is the JNDI provider for MQ, I did it like this:

<Resource
   name="jms/myreqqueue"
   auth="Container"
   type="com.ibm.mq.jms.MQQueue"
   factory="com.ibm.mq.jms.MQQueueFactory"
   QU="MY.REQ.QUEUE"
   TC="1" />

Notice the TC="1". And in Spring JMS I referenced the queue like this:

destination-name="jms/myreqqueue"

Upvotes: 3

Related Questions