mountain

WebSphere MQ 练习

创建队列管理器:QM_IN、QM_OUT
QM_IN :
监听端口为:10001
本地队列:Q_RCV
远程队列:Q_SND
死信队列:DLQ
QM_OUT:
监听端口为:10002
本地队列:Q_SND
远程队列:Q_RCV
死信队列:DLQ

要求:在两个队列管理器中创建发送通道、接受通道,实现从QM_IN的队列Q_SND发送消息到QM_OUT的Q_SND。

crtmqm QM_IN
crtmqm QM_OUT
strmqm QM_IN
strmqm QM_OUT

ECHO ALTER QMGR CCSID(1208) | RUNMQSC QM_IN
echo DEFINE LISTENER(10001) TRPTYPE(TCP) PORT(10001) CONTROL(QMGR) REPLACE | runmqsc QM_IN
ECHO DEFINE QL(Q_RCV) REPLACE | RUNMQSC QM_IN
ECHO DEFINE QL(QM_IN.TO.QM_OUT) USAGE(XMITQ) INITQ(SYSTEM.CHANNEL.INITQ) Replace | runmqsc QM_IN
ECHO DEFINE QR(Q_SND) RQMNAME(QM_OUT) RNAME(Q_SND) XMITQ (QM_IN.TO.QM_OUT) Replace | RUNMQSC QM_IN
ECHO DEFINE QL(DLQ) REPLACE | RUNMQSC QM_IN
ECHO ALTER QMGR DEADQ(DLQ) | RUNMQSC QM_IN
ECHO DEFINE CHL(QM_IN.TO.QM_OUT) CHLTYPE(SDR) CONNAME('127.0.0.1(10002)') XMITQ(QM_IN.TO.QM_OUT) Replace | RUNMQSC QM_IN
ECHO START LISTENER(10001)|RUNMQSC QM_IN
ECHO START CHL(QM_IN.TO.QM_OUT) | RUNMQMSC QM_IN

ENDMQM -I QM_IN
STRMQM QM_IN


ECHO ALTER QMGR CCSID(1208)| RUNMQSC QM_OUT
ECHO DEFINE LISTENER(10002) TRPTYPE(TCP) PORT(10002) CONTROL(QMGR) REPLACE| RUNMQSC QM_OUT
ECHO DEFINE QL(Q_SND) DEFPSIST(YES) REPLACE | RUNMQSC QM_OUT
ECHO DEFINE QR(Q_RCV) REPLACE | RUNMQSC QM_OUT
ECHO DEFINE QL(DLQ) DEFPSIST(YES) REPLACE | RUNMQSC QM_OUT
ECHO ALTER QMGR DEADQ(DLQ) | RUNMQSC QM_OUT
ECHO DEFINE CHL(QM_IN.TO.QM_OUT) CHLTYPE(RCVR) Replace | RUNMQSC QM_OUT
ECHO START CHL(QM_IN.TO.QM_OUT)| RUNMQSC QM_OUT
ECHO START LISTENER(10002) |RUNMQSC QM_OUT
ENDMQM -I QM_OUT
STRMQM QM_OUT

DSPMQ

amqsput Q_SND QM_IN
amqsget Q_SND QM_OUT

posted on 2012-05-20 14:05  Moutnainer  阅读(416)  评论(0编辑  收藏  举报

导航