Wednesday, February 17, 2010

MQ Queue Manager Clusters

=> CLUSTERING
===========
Clustering is a way to logically group WebSphere MQ queue managers
- reduced system administration due to fewer channel, remote queue, and transmission queue definitions
- increased availability and workload balancing.

=> Basic Cluster setup
===============
> Step-1
Determine which queue manager should hold full repositories
A full repository contains a complete set of information about every queue manager and object in the cluster
You will need at least one, preferably two
> Step-2
Alter the queue manager definitions to add repository definitions
ALTER QMGR REPOS(cluster_name)
> Step-3
Define the CLUSRCVR channels
Every queue manager in the cluster needs a CLUSRCVR with a conname pointing to itself.
DEFINE CHANNEL(channel_name) CHLTYPE(CLUSRCVR) TRTYPE(TCP) CONNAME(‘my_ip_name_or_address(port)’) CLUSTER(cluster_name)
> Step-4
Define the CLUSSDR channels
Define one CLUSSDR to a full repository queue manager. The channel name must match that of the CLUSRCVR on the full repository
DO NOT define a CLUSSDR to point to a partial repository.
DEFINE CHANNEL(channel_name) CHLTYPE(CLUSSDR) TRPTYP(TCP) CONNAME(‘remote_ip_name_or_address(port)’) CLUSTER(cluster_name)
> Step-5
Define a cluster queue
DEFINE QLOCAL(qname) CLUSTER(cluster_name)
Other queue managers in the cluster can send message to it without making remote-queue definitions for it.
Only the local queue manager can read messages from an instance of the cluster queue
You can use a sample program to test putting messages to clustered queues

=> Cluster Commands
===============
DISPLAY QMGR REPOS REPOSNL QMID
AMQ8408: Display Queue Manager details.
QMNAME(QM1) QMID(QM1_2005-07-12_17.14.38) REPOS(QMCLUS)REPOSNL( )
QMID is an internally generated unique name that consists of the queue manager name plus the time the queue manager was created

DISPLAY CLUSQMGR(*) ALL
Display cluster Queue managera details

dis chstatus(*) all
Display channel status details

DISPLAY QCLUSTER(*) ALL
It displays information about clustered queues only.
A cluster queue will not be displayed on a partial repository until an application has opened it.

DISPLAY QUEUE(*) CLUSINFO
This command displays information about queues with TYPE(QCLUSTER)

=> Work load balancing
================
When a cluster contains more than one instance of the same queue, workload balancing determines the best queue manager to route a message to
- At its simplest, workload management results in a round-robin effect
MQ V6 has additional parameters that can be used to influence the results of the algorithm.
- Queues: CLWLPRTY, CLWLRANK, CLWLUSEQ
- Queue Managers: CLWLUSEQ, CLWLMRUC
- Channels: CLWLPRTY, CLWLRANK, CLWLWGHT, NETPRTY
For workload balancing to occur:
- open the queue with the MQOO_BIND_NOT_FIXED open option
- open with the default MQOO_BIND_AS_Q_DEF and with DEFBIND(NOTFIXED) set in the queue definition
- Leave MQMD.ObjectQMgrName blank to allow the queue manager to chose the queue instance
- To force the message to a specific instance of the clustered queue, specify that queue manager’s name in ObjectQmgrName

=> Namelists in clusters
================
- A queue manager may be a member of more than one cluster. List those clusters in a NAMELIST.
- You can alter a full repository QMGR to use REPOSNL(namelist) rather than REPOS.
- For channels and queues, you can specify CLUSNL(namelist) rather than specifying the CLUSTER parameter.

=> REFRESH CLUSTER
===============
- REFRESH CLUSTER removes and rebuilds locally held information about a cluster.
- REFRESH CLUSTER(clustername) REPOS(NO)
- REFRESH CLUSTER(clustername) REPOS(YES), also refreshes information about full repository queue managers and may not be issued from a full repository.
- REFRESH CLUSTER(*)

=> RESET CLUSTER
=============
RESET CLUSTER is issued from a full repository queue manager. It forcibly removes a queue manager or specific QMID from a cluster.
- RESET CLUSTER(clustername) QMNAME(qmname) ACTION(FORCEREMOVE) QUEUES(NO)
- RESET CLUSTER(clustername) QMID(qmid) ACTION(FORCEREMOVE) QUEUES(NO)

=> Troubleshooting
=============
- Is the repository manager still running?
Check the AMQERRxx.log or CHIN joblog.
- Are channels able to run in both directions?
Display CLUSQMGR and CHSTATUS information.
- Are the SYSTEM.CLUSTER.* queues enabled?
Issue DISPLAY QUEUE(SYSTEM.C*) ALL
- Are there messages on
SYSTEM.CLUSTER.COMMAND.QUEUE or
SYSTEM.CLUSTER.TRANSMIT.QUEUE?
- Are there duplicate QMIDs for a given QMGR?
Issue DISPLAY CLUSQMG(*) QMID.
- DISPLAY CLUSQMGR may show CLUSQMGR names starting with SYSTEM.TEMP.
The queue manager has not received all necessary information from the full repository.

2 comments:

  1. Hi... Do you know how to resolve SYSTEM.TEMP. issue.

    ReplyDelete
  2. I have had the same issue. checked all the channels, listeners and everything. Recreated them only to discover later that there is one more step which was not mentioned anywhere, that was to give rights to SYSTEM.CLUSTER.TRANSMIT.QUEUE

    setmqaut -m -n SYSTEM.CLUSTER.TRANSMIT.QUEUE -t q -g mqm +all

    ReplyDelete