Saturday, 20 September 2014

MQ Clustering.




Clustering in MQ

Clustering in MQ is the logical way to group Queue managers.
Why Clustering?
Reduced administration.
Fewer Channel definitions, Transmit queues and Remote queues for large WMQ network.
Scalable Message Processing System - Consider the scenario where a client application puts message to a queue and is
expecting a response after the message is processed. If the message processing is time consuming, we can serve
multiple requests efficiently and faster by using clustering to have multiple queues for the same queue image and
associated message processing system.
Increased availability and Workload balancing - This is by creating different instances of same queue in different queue
managers and exposing it in the same Cluster.
Clustering in MQ involves Full Repository Queue Managers, Partial Repository Queue Managers, Cluster-Sender and Cluster-
Receiver channels and a transmit Queue. Transmit is not required to be defined manually. By default, Clustering will use
SYSTEM.CLUSTER.TRANSMIT.QUEUE as the transmit queue for Cluster-Sender Channel.
Full Repository Queue Manager and Partial Repository Queue Manager
It is the queue manager which stores all the information about the Cluster. For a Cluster, there should be at least one Full
Repository Queue manager. Recommended is two Full Repository Queue managers for each Cluster. Full Repository Queue
Managers communicate with each other through two pairs of cluster-sender and cluster-receiver channels.
All the Queue Managers which participate in Clustering and are not Full Repository Queue Managers are called partial
repository Queue Manager. Partial Repository Queue Managers will share all its cluster information to the Full Repository
Queue Managers.
Repository Queue Managers store cluster related information(queue manager names, QMID, their locations, their channels,
which cluster queues they host etc.) about the queue managers that are members of a cluster in the form of messages on a
queue called SYSTEM.CLUSTER.REPOSITORY.QUEUE
Repository Queue Managers Send/Receive repository updates using the queue SYSTEM.CLUSTER.COMMAND.QUEUE
Cluster-Sender and Cluster-Receiver channels
Cluster-Sender and Cluster-Receiver channels are used for communication between the Full Repository Queue Managers and
the Partial Repository Queue Managers in a Cluster. Cluster-Sender channels needs to be defined only to a Full Repository
Queue Manager and that is when we are adding a queue manager to the cluster. All other times, Cluster-Sender channels are
created dynamically using the cluster information about the target Cluster-Receiver channel and for the same reason, we
would need to provide the conname(connection details) while defining the Cluster-Receiver channels unlike normal Receiver channel.

Steps involed in adding a queue manager to an existing cluster
Create a Cluster-Receiver channel in the queue manager being added to the Full Repository queue manager for the
cluster and share it in the cluster
1.
Create a Cluster-Sender receiver channel to the Full Repository queue manager and share 2. it in the cluster.
Scenario: Setting up basic Cluster with only one Full Repository QMGR
STEP1: Creating a Full Repository Queue Manager for the cluster "CLUSA" by altering a queue manager definition


STEP2: Creating a Cluster-Receiver channel in Full Repository to receive the cluster information from the partial repositories of
the cluster. This channel is shared in the cluster "CLUSA".

Adding another Queue Manager to the cluster "CLUSA"
STEP3: Creating Receiver-Channel in the queue manager being added to the cluster, for it to receive messages from other
cluster queue managers. This channel is shared in the cluster "CLUSA".
STEP4: Creating Sender-Channel in the queue manager being added to the cluster to the Receiver-Channel in the Full
Repository queue manager. This channel is shared in the cluster "CLUSA" and it is used to send the cluster information to the
Full Repository queue manager.

Checking the status of the cluster channels. Cluster channels should be running for the cluster information to be shared
properly.


STEP5: Creating a queue in the Partial Repository queue manager and exposing it in the cluster "CLUSA".
Now the applications connected to queue manager APPLE can put messages to the local queue in the queue manager
ORANGE. Clustering will resolve it from the cluster queue visible in APPLE to the local queue in ORANGE.



No comments:

Post a Comment