I have the following setup:
- Four MQ Queue managers in a cluster (
QM1
(full repo),QM2
(full repo),QM3
(partial repo),QM4
(partial repo)) - All cluster sender/receiver channels have the same rank and priority
- each queue manager has a non-clustered alias queue (
ALIAS.TO.CLQ
) ALIAS.TO.CLQ
has a base object ofALIAS.TO.FLOW
, which is a clustered alias queueALIAS.TO.FLOW
has a base object ofL.TO.FLOW
, which is a local queue.- Each of the four queue managers are configured as
CLWLUSEQ(ANY)
. - The clustered alias queues have a
DEFBIND
ofNOT FIXED
. Messages are written by IIB (MQ Output Node), which I believe honours this - although I am seeing the same behaviour using MQ Explorer or RFHUtil also. - Messages are put by the MQ Output Node without specifying a queue manager name
- Each of the four cluster alias queues has a different
CLWLPRTY
, but the sameCLWLRANK
.
The aim of this configuration is to force messages to be received by the same local queue, no matter which queue manager the message is initially put to. If that queue manager is unavailable, the second-highest priority should be used instead, etc.
The issue I am finding is that, for three of the four queue managers the CLWLPRTY
is being honoured and the message routed to the highest-priority queue manager. But, on the queue manager with the highest priority itself, the message is being routed to the second-highest priority; instead of using the queue on the same queue manager, which has the highest priority.
If I change which queue manager has the second-highest priority, the message always gets routed there from the one with the highest priority - so it's not just coincidence. If two queue instances share the highest priority, it'll never select the one on the same queue manager as itself; it always seems to prefer to go out to the cluster.
What's going on here, and how can I get it to always honour the priority no matter where the message is put? I have looked at the "cluster workload management algorithm" page in the IBM documentation (https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.ref.con.doc/q082390_.html) but I can't see where I'm going wrong.
--Update--
I have tried creating a new set of queues, in the same format, but only on one of the cluster queue managers - so, ALIAS.TEST
-> AL.TEST
(cluster but only one instance exists) -> L.TEST
. When I put to ALIAS.TEST
, I get an error message:
An MQOPEN or MQPUT1 call was issued, specifying an alias queue as the target, but the BaseObjectName in the alias queue definition resolves to a queue that is not a local queue, or local definition of a remote queue. (AMQ4480) An MQOPEN or MQPUT1 call was issued, specifying an alias queue as the target, but the BaseObjectName in the alias queue definition resolves to a queue that is not a local queue, or local definition of a remote queue. (AMQ4480)
Severity: 20 (Error)
Response: Correct the queue definitions.
But I can put to the AL.TEST
queue without any issue.
--Edit--
OK, the answer to why it happens appears here: https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.pro.doc/q003120_.html
An alias cannot directly resolve to another alias on the same queue manager.
So how can I get the behaviour I'm wanting?
PUT(ENABLED)
. Specifically if the channel to QM2-4 are in RUNNING status but the channel to QM1 isSTARTING
. If messages are put while the channel to QM1 is inSTARTING
status they would go to QM2. – JoshMc