How to generate WebSphere MQ Message from Spring JMS?

不打扰是莪最后的温柔 提交于 2021-02-10 05:18:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!