Topic
  • 5 replies
  • Latest Post - ‏2008-10-31T08:06:52Z by SystemAdmin
SystemAdmin
SystemAdmin
8523 Posts

Pinned topic load balancing

‏2008-10-13T09:19:39Z |
I am implementing load balancing and below is the code. The channels are running fine. But when I try to put a message on QM1 qremote, the message goes missing. It does not enter the QM1.RQSTIN local queue of QM4 and QM5.

QM1

DEFINE QLOCAL(DEAD.QUEUE)

DEFINE QREMOTE(QM1.RQSTIN) RNAME(QM1.RQSTIN) RQMNAME(QM2) XMITQ(QM2.XMIT) PUT(ENABLED)

DEFINE QLOCAL(QM2.XMIT) USAGE(XMITQ) TRIGGER TRIGDATA(QM1.QM2.DF) TRIGTYPE(FIRST)

DEFINE CHANNEL(QM1.QM2.DF) CHLTYPE(SDR) TRPTYPE(TCP) XMITQ(QM2.XMIT) CONNAME('localhost(1415)')

DEFINE CHANNEL(QM2.QM1.DF) CHLTYPE(RCVR) TRPTYPE(TCP)
QM2

DEFINE QLOCAL(DEAD.QUEUE)

DEFINE QREMOTE(QM1.RQSTIN) RNAME(QM1.RQSTIN) RQMNAME(ANY.QMGR) XMITQ(Q3.XMIT) PUT(ENABLED)

DEFINE QLOCAL(QM3.XMIT) USAGE(XMITQ) TRIGGER TRIGDATA(QM2.QM3.DF) TRIGTYPE(FIRST)

DEFINE CHANNEL(QM2.QM3.DF) CHLTYPE(SDR) TRPTYPE(TCP) XMITQ(QM3.XMIT) CONNAME('localhost(1416)')

DEFINE CHANNEL(QM1.QM2.DF) CHLTYPE(RCVR) TRPTYPE(TCP)

runmqlsr -m QM2 -t tcp -p 1415
QM3

DEFINE QLOCAL(DEAD.QUEUE)

DEFINE QREMOTE(ANY.QMGR)

DEFINE CHANNEL(QM2.QM3.DF) CHLTYPE(RCVR) TRPTYPE(TCP)

DEFINE CHANNEL(QM3.QM4.DF) CHLTYPE(CLUSSDR) CONNAME('localhost(1417)') CLUSTER(CLUS2)

DEFINE CHANNEL(QM3.QM3.DF) CHLTYPE(CLUSRCVR) CONNAME('localhost(1416)') CLUSTER(CLUS2)

runmqlsr -m QM3 -t tcp -p 1416
QM4

ALTER QMGR REPOS(CLUS2)

DEFINE QLOCAL(DEAD.QUEUE)

DEFINE CHANNEL(QM3.QM4.DF) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('localhost(1417)') CLUSTER(CLUS2)

DEFINE CHANNEL(QM4.QM5.DF) CHLTYPE(CLUSSDR) CONNAME('localhost(1418)') CLUSTER(CLUS2)

DEFINE QLOCAL(QM1.RQSTIN) CLUSTER(CLUS2)

runmqlsr -m QM4 -t tcp -p 1417
QM5

ALTER QMGR REPOS(CLUS2)

DEFINE QLOCAL(DEAD.QUEUE)

DEFINE CHANNEL(QM4.QM5.DF) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('localhost(1418)') CLUSTER(CLUS2)

DEFINE CHANNEL(QM3.QM4.DF) CHLTYPE(CLUSSDR) CONNAME('localhost(1417)') CLUSTER(CLUS2)

DEFINE QLOCAL(QM1.RQSTIN) CLUSTER(CLUS2)

runmqlsr -m QM5 -t tcp -p 1418

Your help is kindly appreciated.

Thank You.

Regards.
Updated on 2008-10-31T08:06:52Z at 2008-10-31T08:06:52Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: load balancing

    ‏2008-10-14T00:23:40Z  
    Is the msg on QM2.XMITQ ? Did the sender channel QM1.QM2.DF start ok ?
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: load balancing

    ‏2008-10-14T02:31:12Z  
    QM1.QM2.DF - running
    QM2.XMIT - Current Depth = 0
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: load balancing

    ‏2008-10-14T02:36:06Z  
    Now it works. Human error:

    QM2

    DEFINE QREMOTE(QM1.RQSTIN) RNAME(QM1.RQSTIN) RQMNAME(ANY.QMGR) XMITQ(Q3.XMIT) PUT(ENABLED)

    suppose to be

    DEFINE QREMOTE(QM1.RQSTIN) RNAME(QM1.RQSTIN) RQMNAME(ANY.QMGR) XMITQ(QM3.XMIT) PUT(ENABLED)

    I missed the word "M" for transmission queue definition.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: load balancing

    ‏2008-10-14T23:58:22Z  
    Now it works. Human error:

    QM2

    DEFINE QREMOTE(QM1.RQSTIN) RNAME(QM1.RQSTIN) RQMNAME(ANY.QMGR) XMITQ(Q3.XMIT) PUT(ENABLED)

    suppose to be

    DEFINE QREMOTE(QM1.RQSTIN) RNAME(QM1.RQSTIN) RQMNAME(ANY.QMGR) XMITQ(QM3.XMIT) PUT(ENABLED)

    I missed the word "M" for transmission queue definition.
    :-) It is possible to name transmission queues with the same name as the remote queue manager. This allows local apps that generate replies to open the queue to put replies to the remote qmgr without going through an intermediate qremote or qalias object. MQ automatically adds the MQXQH structure to the message data.

    The down-side is that the apps need put authority to the xmitq, and this allows the possibility to put to all queues on the remote qmgr, which is bad from a security perspective.

    Glenn.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: load balancing

    ‏2008-10-31T08:06:52Z  
    Like this:

    QMGR1

    DEFINE QR(TARG3) RNAME(TARG3) RQMNAME(QMGR2)

    DEFINE QL(QMGR2) USAGE(XMITQ)

    DEFINE CHL(QMGR1.TO.QMGR2) CHLTYPE(SDR) CONNAME('localhost(1415)') TRPTYPE(TCP) XMITQ(QMGR2)
    QMGR2

    DEFINE QR(TARG3) RNAME(TARGET3) RQMNAME(QMGR3)

    DEFINE QL(QMGR3) USAGE(XMITQ)

    DEFINE CHL(QMGR2.TO.QMGR3) CHLTYPE(SDR) CONNAME('localhost(1416)') TRPTYPE(TCP) XMITQ(QMGR3)

    DEFINE CHL(QMGR1.TO.QMGR2) CHLTYPE(RCVR) TRPTYPE(TCP)

    runmqlsr -m QMGR2 -t TCP -p 1415
    QMGR3

    DEFINE QL(TARGET3)

    DEFINE CHL(QMGR2.TO.QMGR3) CHLTYPE(RCVR) TRPTYPE(TCP)

    runmqlsr -m QMGR3 -t TCP -p 1416