Clustering: Example configuration of multiple cluster transmission queues
In this task you apply the steps to plan multiple cluster transmission queues to three overlapping clusters. The requirements are to separate messages flows to one cluster queue, from all other message flows, and to store messages for different clusters on different cluster transmission queues.
About this task
The steps in this task show how to apply the procedure in Clustering: Planning how to configure cluster transmission queues and arrive at the configuration shown in Figure 1. It is an example of three overlapping clusters, with a gateway queue manager, that is configured with separate cluster transmission queues. The MQSC commands to define the clusters are described in Creating the example clusters.
For the example, there are two requirements. One is to separate the message flow from the gateway queue manager to the sales application that logs sales. The second is to query how many messages are waiting to be sent to different departmental areas at any point in time. The SALES
, FINANCE
, and DEVELOP
clusters are already defined. Cluster messages are currently forwarded from SYSTEM.CLUSTER.TRANSMIT.QUEUE
.
The steps to modify the clusters are as follows. For the definitions, see Changes to isolate the sales queue in a new cluster and separate the gateway cluster transmission queues.
Procedure
What to do next
Switch to the new configuration on the gateway queue manager.
The switch is triggered by starting the new channels, and restarting the channels that are now associated with different transmission queues. Alternatively, you can stop and start the gateway queue manager.
- Stop the following channels on the gateway queue manager:
SALES. Qmgr DEVELOP. Qmgr FINANCE. Qmgr
- Start the following channels on the gateway queue manager:
SALES. Qmgr DEVELOP. Qmgr FINANCE. Qmgr Q.SALES.SAVESRV
When the switch is complete, remove the SALES
queue from the SALES
cluster; see Figure 2.
Creating the example clusters
The definitions and instructions to create the example cluster, and modify it to isolate the SALES
queue and separate messages on the gateway queue manager.
About this task
The full MQSC commands to create the FINANCE
, SALES
, and Q.SALES
clusters are provided in Definitions for the basic clusters, Changes to isolate the sales queue in a new cluster and separate the gateway cluster transmission queues, and Remove the sales queue on queue manager SALESRV from the sales cluster. The DEVELOP
cluster is omitted from the definitions, to keep the definitions shorter.
Procedure
What to do next
- Rerun the sample request program to verify the new configuration works; see step 2
- Monitor the messages flowing through all the cluster transmission queues on the
GATE
queue manager:- Alter the definition of each of the cluster transmission queues to turn queue monitoring on.
ALTER QLOCAL(SYSTEM.CLUSTER.TRANSMIT. name) STATQ(ON)
- Check queue manager statistics monitoring is
OFF
, to minimize output, and set the monitoring interval to a lower value to perform multiple tests conveniently.ALTER QMGR STATINT(60) STATCHL(OFF) STATQ(OFF) STATMQI(OFF) STATACLS(OFF)
- Restart the
GATE
queue manager. - Run the sample request program a few times to verify that an equal number of messages are flowing through
SYSTEM.CLUSTER.TRANSMIT.Q.SALES.SALESRV
andSYSTEM.CLUSTER.TRANSMIT.QUEUE
. Requests flow throughSYSTEM.CLUSTER.TRANSMIT.Q.SALES.SALESRV
and replies throughSYSTEM.CLUSTER.TRANSMIT.QUEUE
.amqsmon -m GATE -t statistics
- The results over a couple of intervals are as follows:
C:\Documents and Settings\Admin>amqsmon -m GATE -t statistics
MonitoringType: QueueStatistics
QueueManager: 'GATE'
IntervalStartDate: '2012-02-27'
IntervalStartTime: '14.59.20'
IntervalEndDate: '2012-02-27'
IntervalEndTime: '15.00.20'
CommandLevel: 700
ObjectCount: 2
QueueStatistics: 0
QueueName: 'SYSTEM.CLUSTER.TRANSMIT.QUEUE'
CreateDate: '2012-02-24'
CreateTime: '15.58.15'
...
Put1Count: [0, 0]
Put1FailCount: 0
PutBytes: [435, 0]
GetCount: [1, 0]
GetBytes: [435, 0]
...
QueueStatistics: 1
QueueName: 'SYSTEM.CLUSTER.TRANSMIT.Q.SALES.SAVESRV'
CreateDate: '2012-02-24'
CreateTime: '16.37.43'
...
PutCount: [1, 0]
PutFailCount: 0
Put1Count: [0, 0]
Put1FailCount: 0
PutBytes: [435, 0]
GetCount: [1, 0]
GetBytes: [435, 0]
...
MonitoringType: QueueStatistics
QueueManager: 'GATE'
IntervalStartDate: '2012-02-27'
IntervalStartTime: '15.00.20'
IntervalEndDate: '2012-02-27'
IntervalEndTime: '15.01.20'
CommandLevel: 700
ObjectCount: 2
QueueStatistics: 0
QueueName: 'SYSTEM.CLUSTER.TRANSMIT.QUEUE'
CreateDate: '2012-02-24'
CreateTime: '15.58.15'
...
PutCount: [2, 0]
PutFailCount: 0
Put1Count: [0, 0]
Put1FailCount: 0
PutBytes: [863, 0]
GetCount: [2, 0]
GetBytes: [863, 0]
...
QueueStatistics: 1
QueueName: 'SYSTEM.CLUSTER.TRANSMIT.Q.SALES.SAVESRV'
CreateDate: '2012-02-24'
CreateTime: '16.37.43'
...
PutCount: [2, 0]
PutFailCount: 0
Put1Count: [0, 0]
Put1FailCount: 0
PutBytes: [863, 0]
GetCount: [2, 0]
GetBytes: [863, 0]
...
2 Records Processed.
One request and reply message were sent in the first interval and two in the second. You can infer that the request messages were placed on
SYSTEM.CLUSTER.TRANSMIT.Q.SALES.SAVESRV
, and the reply messages onSYSTEM.CLUSTER.TRANSMIT.QUEUE
.
- Alter the definition of each of the cluster transmission queues to turn queue monitoring on.