在运行MQSeries 的机器上
用指令“crtmqm –q vernus.queue.manager”建立缺省队列管理器
MQSeries 返回信息,表示缺省队列管理器已经建立,缺省的MQSeries 对象已经创建
用指令“strmqm”启动缺省队列管理器
MQSeries 返回信息,表示队列管理器已经启动
用指令“runmqsc”进入MQSC 命令行
MQSeries 返回信息“Starting MQSeries Commands”
在MQSC 命令行:
用指令“define qlocal(orange.queue)”定义本地队列
用指令“end”结束MQSC 命令行
MQSeries 返回信息“one MQSC command read.No commands have a syntax error.All valid
MQSC commands were processed.”
用指令“/usr/mqm/samp/bin/amqsput ORANGE.QUEUE”向本地队列ORANGE.QUEUE 内置
入信息
MQSeries 返回信息“Sample amqsput0 start,target queue is ORANGE.QUEUE”
输入“hello world”,按两次enter 退出amqsput 例程
MQSeries 返回信息“Sample amqsput0 end”
用指令“amqsget ORANGE.QUEUE”从本地队列ORANGE.QUEUE 取出信息
MQSeries 返回信息“Sample amqsget0 start,message<hello world>,nomore messages,Sample
AMQSGET0 end ”
测试完成
b) 服务器间通信功能测试
在发送消息的MQSeries 服务器上
用指令“crtmqm –q saturn.queue.manager”建立缺省队列管理器
MQSeries 返回信息,表示缺省队列管理器已经建立,缺省的MQSeries 对象已经创建
用指令“strmqm”启动缺省队列管理器
MQSeries 返回信息,表示队列管理器已经启动
用指令“runmqsc”进入MQSC 命令行
MQSeries 返回信息“Starting MQSeries Commands”
在MQSC 命令行:
用指令“define qlocal(transmitl.queue) usage(xmitq)”为队列管理器saturn.queue.manager 创
建传输队列
MQSeries 返回信息“Mqseries queue created”表示队列创建成功
用指令“ define qremote (local.def.of.remote.queue) rname (orange.queue) rqmname
(‘venus.queue.manager’) xmitq (transmitl.queue)”为远程通信队列创建本地定义
用指令“ define channel(first.channel)chltype(sdr) conname($IPADDRESS)
xmitq(transmitl.queue) trptype(tcp)”创建发送通道,其中$IPADDRESS 为接收方的IP 地址
用指令“end”结束MQSC 命令行
发送方服务器设置完毕
在接收消息的MQSeries 服务器上
编辑/etc/service 文件,增加一行“MQSeries 1414/tcp”
编辑/etc/inetd.conf 文件,增加一行“MQSeries stream tcp nowait mqm /usr/mqm/bin/amqcrsta
amqcrsta”
用指令“refresh –s inetd”刷新inetd 进程
用指令“crtmqm –q venus.queue.manager”创建缺省队列管理器
MQSeries 返回信息,表示缺省队列管理器已经建立,缺省的MQSeries 对象已经创建
用指令“strmqm”启动缺省队列管理器
MQSeries 返回信息,表示队列管理器已经启动
用指令“runmqsc”进入MQSC 命令行
MQSeries 返回信息“Starting MQSeries Commands”
在MQSC 命令行:
用指令“define qlocal(orange.queue)”定义本地队列
用指令“define channel(first.queue)chltype(rcvr) trptype(tcp)”创建接收通道
用指令“end”结束MQSC 命令行
接收方服务器设置完毕
在发送方服务器上
用指令“runmqchl –c FIRST.CHANNEL –m Saturn.queue.manager”启动发送通道
接收方服务器自动启动相应的接收通道
用指令“amqsput LOCAL.DEF.OF.REMOTE.QUEUE”向接收方服务器上的远程队列发送一
条消息
输入要发送的消息例如“hello”,按enter 两次退出发送例程
在接收方服务器上
用指令“amqsget ORANGE.QUEUE”从本地队列中取出所收到的消息
MQSeries 返回所收到的消息“hello”
测试完成
8328



被折叠的 条评论
为什么被折叠?



