问题
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.
回答1:
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"
来源:https://stackoverflow.com/questions/54322232/how-to-generate-websphere-mq-message-from-spring-jms