windows的MQ队列向AIX发送消息,发送完成,消息堵塞在传输队列,同时之前同AIX连接的通道关闭。状态为“正在重试”。
解决办法:
查明错误码,是CCSID编码格式不匹配引起的
AIX上的MQ 队列管理器的ccsid编码格式是819
windows的MQ 队列管理器的 ccsid 编码格式 1381.
之后将Windows 的MQ 队列管理器的CCSID 编码格式修改为 819
过程: 1, runmqsc <队列管理器名>
2, alter qmgr ccsid(819)
重启队列管理器后生效,ccsid 更改为 819
此时通过windows MQ资源管理器向AIX的远程队列发送测试消息,异常不成功。现象同之前相同。但是通过AIX向windows的队列发送消息,能够成功的。
查询各种资料,如在中文 websphere 技术论坛的( http://www.webspherechina.net/club/viewthread.php?tid=16058&extra=&page=2)
你缺少的是这个表:05650333.tbl
如果这个表存在的话。
只说明了现象,依然无法解决
最后谷歌查英文资料( http://www.mqseries.net/phpBB2/viewtopic.php?t=60792&sid=3c05ba981176264a0be989dc145d8d87)发现:
需要修改ccsid.tbl ,文件位置在我的电脑的位置是: c:\IBM\WebSphere MQ\conv\table
开启MQ server 的CCSID转换功能
去除之前的注释即可
# DEFAULT DATA CONVERSION # # You can define default conversion CCSIDs which will be used to convert # between ASCII or similar and EBCDIC CCSIDs if no conversion is supported # between two CCSIDs. If enabled, the default conversion is used for # transmission and message headers and can also be enabled in user data # conversion. For more information see the System Administration book. # # Default conversions are enabled by creating two lines similar to the # two following, but removing the # character which indicates a comment. default 0 500 1 1 0 default 0 850 1 2 0
报文发送后,依然有2011 错误。服务器MQGET 报的
原来是MQMessage的报文内容需要更改编码格式
将MQMessage 设置为 819的格式,如下:
MQMessage reqMsg = new MQMessage(); reqMsg.encoding = 273; reqMsg.characterSet = 819; reqMsg.format = MQConstants.MQFMT_STRING;
以上内容参考自: http://zrcoffee.iteye.com/blog/1172344