MQServer1:10.13.106.36
MQServer2:10.13.106.37
1、实现 MQServer2 发信息到MQServer1:
MQServer1 创建队列、通道和监听器:
crtmqm QM_APPLE strmqm QM_APPLE
runmqsc QM_APPLE define qlocal(Q1) define channel(QM_ORANGE.QM_APPLE) chltype(RCVR) trptype(TCP) alter listener(system.default.listener.tcp) trptype(tcp) port(1414) start listener(system.default.listener.tcp) end
MQServer2 创建队列和通道:
crtmqm QM_ORANGE strmqm QM_ORANGE
runmqsc QM_ORANGE define qlocal(QM_APPLE) usage(xmitq) define qremote(Q1) rname(Q1) rqmname(QM_APPLE) xmitq(QM_APPLE) define channel(QM_ORANGE.QM_APPLE) chltype(SDR) conname(‘10.13.106.36(1414)‘) xmitq(QM_APPLE) trptype(TCP) start channel(QM_ORANGE.QM_APPLE) end
# xmitq 所要用的传输队列
# usage 用途xmitq是传输队列
MQServer2 发送消息:
-bash-4.1$ amqsput Q1 QM_ORANGE Sample AMQSPUT0 start target queue is Q1 HELLO MQSERVER1 Sample AMQSPUT0 end -bash-4.1$
MQServer1 接收消息:
-bash-4.1$ amqsget Q1 QM_APPLE Sample AMQSGET0 start message <HELLO MQSERVER1> no more messages Sample AMQSGET0 end -bash-4.1$
2、实现 MQServer1 发信息到MQServer2:
MQServer2 创建队列、通道和监听器:
runmqsc QM_APPLE define qlocal(Q2) define channel(QM_APPLE.QM_ORANGE) chltype(RCVR) trptype(TCP) alter listener(system.default.listener.tcp) trptype(tcp) port(1414) start listener(system.default.listener.tcp) end
MQServer1 创建队列和通道:
runmqsc QM_ORANGE define qlocal(QM_ORANGE) usage(xmitq) define qremote(Q2) rname(Q2) rqmname(QM_ORANGE) xmitq(QM_ORANGE) define channel(QM_APPLE.QM_ORANGE) chltype(SDR) conname(‘10.13.106.36(1414)‘) xmitq(QM_ORANGE) trptype(TCP) start channel(QM_APPLE.QM_ORANGE) end
原文地址:http://huhaiqing.blog.51cto.com/6338282/1769295