I hit this problem earlier today: -
/opt/ibm/mqm/usr/mqm/samp/bin/amqsput ESB.TO.BPM.CLQ ESB1.DEV1
Sample AMQSPUT0 start
target queue is ESB.TO.BPM.CLQ
MQOPEN ended with reason code 2085
unable to open queue for output
Sample AMQSPUT0 end
I could see the queue on the Queue Manager local to where I was running the command ( my ESB box, running IIB 9 and MQ 8 ).
However, when I looked more deeply: -
1 : display queue(ESB*)
AMQ8409: Display Queue details.
QUEUE(ESB.TO.BPM.CLQ) TYPE(QLOCAL)
display queue(ESB.TO.BPM.CLQ)
2 : display queue(ESB.TO.BPM.CLQ)
AMQ8409: Display Queue details.
QUEUE(ESB.TO.BPM.CLQ) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2015-04-07)
ALTTIME(13.28.28) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER(UAT1) CLCHNAME( )
CLWLPRTY(0) CLWLRANK(0)
CLWLUSEQ(ANY) CRDATE(2015-04-07)
CRTIME(13.28.28) CURDEPTH(0)
CUSTOM( ) DEFBIND(NOTFIXED)
DEFPRTY(0) DEFPSIST(YES)
DEFPRESP(SYNC) DEFREADA(NO)
….
I could immediately see the problem ….
2 : display queue(ESB.TO.BPM.CLQ)
AMQ8409: Display Queue details.
QUEUE(ESB.TO.BPM.CLQ) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2015-04-07)
ALTTIME(13.28.28) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER(UAT1) CLCHNAME( )
CLWLPRTY(0) CLWLRANK(0)
CLWLUSEQ(ANY) CRDATE(2015-04-07)
CRTIME(13.28.28) CURDEPTH(0)
CUSTOM( ) DEFBIND(NOTFIXED)
DEFPRTY(0) DEFPSIST(YES)
DEFPRESP(SYNC) DEFREADA(NO)
….
I could immediately see the problem ….
The cluster to which I was expecting the Queue to belong was called DEV1 and yet the CLUSTER() value above was set to UAT1.
I verified this: -
display CLUSQMGR(*)
5 : display CLUSQMGR(*)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(LRPO1.DEV1) CHANNEL(DEV1.LRPO1.DEV1)
CLUSTER(DEV1)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(REP1.DEV1) CHANNEL(DEV1.REP1.DEV1)
CLUSTER(DEV1)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(REP2.DEV1) CHANNEL(DEV1.REP2.DEV1)
CLUSTER(DEV1)
which confirmed that the cluster name should indeed be DEV1.
I changed the Queue definition: -
alter qlocal(ESB.TO.BPM.CLQ) cluster(DEV1)
5 : display CLUSQMGR(*)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(LRPO1.DEV1) CHANNEL(DEV1.LRPO1.DEV1)
CLUSTER(DEV1)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(REP1.DEV1) CHANNEL(DEV1.REP1.DEV1)
CLUSTER(DEV1)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(REP2.DEV1) CHANNEL(DEV1.REP2.DEV1)
CLUSTER(DEV1)
which confirmed that the cluster name should indeed be DEV1.
I changed the Queue definition: -
alter qlocal(ESB.TO.BPM.CLQ) cluster(DEV1)
and re-tested: -
/opt/ibm/mqm/usr/mqm/samp/bin/amqsput ESB.TO.BPM.CLQ ESB1.DEV1
it responded as I'd expected: -
Sample AMQSPUT0 start
target queue is ESB.TO.BPM.CLQ
Hello BPM from ESB
Sample AMQSPUT0 end
it responded as I'd expected: -
Sample AMQSPUT0 start
target queue is ESB.TO.BPM.CLQ
Hello BPM from ESB
Sample AMQSPUT0 end
which is nice.
Thanks to this: -
for making me think about the Cluster name within the Queue definition: -
Slide 44 says: -
In order to make a queue visible to the other members of the cluster, it is necessary to ALTER the queue and specify the cluster name:
ALTER QLOCAL(CQ1) CLUSTER('CLUSTER1')
You do a remote PUT into a clustered queue. However, you cannot do a remote GET from a clustered queue.
ALTER QLOCAL(CQ1) CLUSTER('CLUSTER1')
You do a remote PUT into a clustered queue. However, you cannot do a remote GET from a clustered queue.
The GET can ONLY be done from the local queue.
No comments:
Post a Comment