如何从Spring JMS生成WebSphere MQ消息? [英] How to generate WebSphere MQ Message from Spring JMS?

查看:87
本文介绍了如何从Spring JMS生成WebSphere MQ消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以WebSphere MQ消息格式生成队列消息.默认情况下,spring产生的消息为JMS格式.我已经搜索过,并且知道WebSphere MQ消息格式包含MQMD和RFH2标头.不知道如何从Spring生成这两个.

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.

推荐答案

其中Tomcat context.xml

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" />

请注意 TC ="1" .在Spring JMS中,我这样引用了队列:

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

destination-name="jms/myreqqueue"

这篇关于如何从Spring JMS生成WebSphere MQ消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆