MQ pub-sub setup


MQ version: 7
MQ user: mqm[group:mqm]
host: 192.168.0.1
mq folder=/opt/mqm
Queue Manager:    QM_TEST     
port:1530
Queues:    QUEUE1,QUEUE2
Channel:    TEST.SVRCONN
Topic:    TEST.TOPIC.NAME

MQ pub-sub setup steps:
1.ssh to <host> by mqm_user or mqm user
2.go to <mq folder>/bin and run following command.
    1).Create queue manager:
        crtmqm QM_TEST
    2).Start queue manager:
        strmqm QM_TEST
    3).Go to queue manager console and create channel
        runmqsc QM_TEST
    DEFINE CHANNEL (TEST.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE (TCP) MCAUSER('mqm') REPLACE
    DEFINE CHANNEL ('SYSTEM.ADMIN.SVRCONN') CHLTYPE(SVRCONN) TRPTYPE(TCP) +
                  DESCR(' ') HBINT(300)  MAXMSGL(4194304) MCAUSER('mqm') RCVDATA(' ') +
                  RCVEXIT(' ') SCYDATA(' ') SCYEXIT(' ') SENDDATA(' ')  SENDEXIT(' ') REPLACE       
        end
    4).Setup system queues for pub-sub:
        go to <mq folder>/java/bin/ and "runmqsc QM_TEST < MQJMS_PSQ.mqsc"
    5).Create publish/replay queues:
        runmqsc QM_TEST
        DEFINE QLOCAL (QUEUE1) REPLACE  DEFPSIST(NO)  MAXDEPTH(1000);
        DEFINE QLOCAL (QUEUE2) REPLACE  DEFPSIST(NO)  MAXDEPTH(1000);
        end
    6).Create topic:
        runmqsc QM_TEST
        DEFINE TOPIC(TEST.TOPIC.NAME) TOPICSTR(NEWS/SPORT) DESCR('TOPIC TEST') PUB(ASPARENT) SUB(ENABLED)  WILDCARD(PASSTHRU)
        end
    7).Run MQ listener:
        runmqlsr -m QM_TEST -t TCP -p 1530 &

   

你可能感兴趣的:(set)