CLWLPRTY tells IBM MQ which cluster queue instance should win when sites compete at different importance levels. What happens when QM_APP1 and QM_APP2 are both production-active, both set to CLWLPRTY(7), and both healthy? Priority no longer distinguishes them—CLWLRANK (cluster workload rank) supplies the next ordering key. Lower rank values are more preferred when priorities match, so rank 0 beats rank 1 at the same priority band. Operators who only tune priority see unexplained fifty-fifty splits because both sites share priority 7 with default rank 0 and equal weights. This tutorial explains rank on queues and channels, pairing rank with priority for subtle preference, active/active tie-break design, DISPLAY and ALTER MQSC, algorithm position after CLWLUSEQ and CLWLPRTY, misconceptions about inverting rank numbers, failover scenarios when ranks should change, and lab validation steps before go-live.
Simplified decision flow: filter instances by availability and CLWLUSEQ; compare CLWLPRTY and keep the highest priority candidates; among those with equal priority, prefer lower CLWLRANK; if still tied, CLWLWGHT may distribute proportionally. Rank therefore matters most in active/active pairs deliberately given the same priority. It also matters when architects want two tiers inside one priority band—both sites priority 7, but London rank 0 and Paris rank 1 so London wins ties without demoting Paris to priority 5.
| Aspect | CLWLPRTY | CLWLRANK |
|---|---|---|
| When evaluated | Before rank among candidates | After priority tie |
| Typical range | 0–9 | 0–9 (confirm on your release) |
| Primary use | Primary vs backup | Peer tie-break |
| Higher number means | More preferred | Less preferred (lower rank wins) |
| Default | 0 | 0 |
1234567* Active/active same priority - rank breaks ties DEFINE QLOCAL('ORDERS.IN') CLUSTER('SALES') REPLACE + CLWLPRTY(7) CLWLRANK(0) CLWLWGHT(50) CLWLUSEQ(ANY) * On QM_APP2: DEFINE QLOCAL('ORDERS.IN') CLUSTER('SALES') REPLACE + CLWLPRTY(7) CLWLRANK(1) CLWLWGHT(50) CLWLUSEQ(ANY) DISPLAY QLOCAL('ORDERS.IN') CLWLPRTY CLWLRANK CLWLWGHT
Here APP1 wins ties against APP2 because rank 0 is more preferred than rank 1 at equal priority. Weights at 50 suggest balanced share when the algorithm reaches weighting—observe actual distribution in lab; rank may steer many puts before weights apply depending on candidate set. Document intended steady-state percentages and adjust rank or weight together rather than one attribute in isolation.
When multiple cluster paths exist between the same pair of queue managers—different listeners, VPNs, or data centers—channel CLWLPRTY and CLWLRANK influence which path workload prefers. Queue tuning does not help if all paths use a congested channel with poor rank. DISPLAY CHANNEL(name) CLWLPRTY CLWLRANK on CLUSSDR and CLUSRCVR pairs when diagnosing uneven link utilization. Align channel rank with queue rank strategy so applications and infrastructure tell a consistent story.
Some runbooks lower priority on failure; others keep priority and swap rank so DR moves from rank 1 to rank 0 while primary is inhibited. Rank swap alone does not help if the primary instance still appears available to the repository—combine with queue inhibit, queue manager outage simulation, or removal of primary from candidate set per your architecture. After failover drill, restore rank and priority to documented normal values to avoid silent preference for DR after recovery.
CLWLPRTY is the ticket class—first class versus coach. CLWLRANK is the seat number within the same class—row 1 beats row 5 when both passengers hold first class tickets.
During load test, sample CURDEPTH on each instance every minute. If rank 0 instance depth grows faster while both are eligible, rank behaves as expected. If depths stay equal despite rank skew, check CLWLUSEQ LOCAL on putting members, bind options, or whether only one instance appears in repository cache. DISPLAY CLUSQ on putting queue manager shows known instances and attributes cached from repository.
Two friends both have gold stars (same priority). CLWLRANK is the smaller number written on your gold star so the teacher picks you first when only gold-star kids can go to recess.
Two members both CLWLPRTY(8)—design ranks so site A wins ties but site B still receives traffic when weights apply.
Explain why setting rank 9 on primary and rank 0 on backup at equal priority may invert your intent.
List DISPLAY commands to verify rank on all instances of ORDERS.IN.
1. CLWLRANK mainly breaks ties when:
2. Lower CLWLRANK value generally means:
3. Default CLWLRANK is typically:
4. Rank without priority difference: