Difference between rank and priority in WebSphere MQ cluster ?

IBM MQ Cluster is mainly for work load balancing by routing the incoming message to multiple destinations based on the cluster routing algorithms and priorities set at each level . These are mainly categorised in to the below .

  • Use-queue attribute- CLWLUSEQ for queue and queue manager
  • Rank attribute -CLWLRANk for queues and channels
  • Priority -NETPRTY for channels and CLWLPRTY for queues and channels
  • weight – CLWLWGHT attribute for channel
  • Most recently used – CLWLMRUC

All the above categories have higher precedence for the upper ones than the lower ones to decide the destination of the message to deliver .

RANK Attribute :-

Channels and queues with highest rank value are chosen over channels and queue with the Lower ranks . Channel rank is checked before queue rank . This attribute has preference over other attributes like priority ,Weights and mostly recently used channels attributes as provided in the above categories .

CLWLRANK will ignore channel status ,this means if the channels is even down the message will be routed to the QMGR having the highest rank .In this case message will remain in the cluster transmission queue until the channel is up and the message gets routed to destination queue manager .

Command to şet channel rank

DEFINE CHL(TO.QMGR) CHLTYPE(CLUSRCVR) CLUSTER(CLUSER1) CLWLRANK()

RANK RANGE 0 – 9

DEFAULT 0

Command to set Queue Rank

DEFINE QL(LQUEUE) CLUSTER(CLUSTER1) CLWLRANK()

RANK RANGE 0 – 9

DEFAULT 0

Highest rank is 9 and lowest is 0 . Channels with highest rank will be considered then the lowest if the channels has same rank then queue rank will be checked for destination the message to the Queue manager .

So it means queue rank will not be checked unless channels rank are not same .

Note: both Rank and priority are set at Cluster Receiver channel not on the sender channels .

Priority Attribute :-

This attribute ensure to select the available QMGR in preference with loser priority ones . channels and queues with highest priorities are chosen preferably over channels and queue with lower priorities . channel priorities is checked before queue priority .

The biggest difference between RANK and PRIORITY is with PRIORITY attribute set ,MQ considers the channels status before sending the message .This means if the queue manager or cluster sender is down then the queue manager even have highest priority is not considered it will send the message to the running queue manager with lower priority .

Where as channel with RANK is set than the channels status is checked after placing the message in transmission queue .

However RANK is checked before PRIORITY Attribute as it is higher precedence .

Command to set channel priority :

DEFINE CHL(TO.QMGR) CHLTYPE(CLUSRCVR) CLUSTER(CLUSTER1) CLWLPRTY()

RANGE : 0 -9

DEFAULT :0

Command to set queue priority :

DEFINE QL(QLOCAL) CLUSTER(CLUSTER1) CLWLPRTY()

RANGE: 0 – 9

DEFAULT : 0

Highest is 9 and lowest is 0

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *