Home

 

Sample cluster workload exit

 

WebSphere MQ includes a sample cluster workload exit program. We can copy this sample and use it as a basis for your own programs.

WebSphere MQ for z/OS

The sample cluster workload exit program is supplied in Assembler and in C. The Assembler version is called CSQ4BAF1 and can be found in the library thlqual.SCSQASMS. The C version is called CSQ4BCF1 and can be found in the library thlqual.SCSQC37S. (thlqual is the target library high-level qualifier for WebSphere MQ data sets in your installation.)

On platforms other than z/OS

The sample cluster workload exit program is supplied in C and is called amqswlm0.c. It can be found in:

Sample cluster workload exit program location (not z/OS)
AIX /usr/mqm/samp
HP-UX, Sun Solaris /opt/mqm/samp
Windows C:\\Websphere MQ\Tools\c\Samples

(Where C is the drive on which you have installed the product.)

iSeries The qmqm library

This sample exit routes all messages to a particular queue manager, unless that queue manager becomes unavailable. It reacts to the failure of the queue manager by routing messages to another queue manager.

You indicate which queue manager you want messages to be sent to by supplying the name of its cluster-receiver channel in the CLWLDATA attribute on the queue-manager definition. For example:

ALTER QMGR CLWLDATA('TO.myqmgr')

To enable the exit, supply its full path and name in the CLWLEXIT attribute:

On UNIX systems:

ALTER QMGR CLWLEXIT('path/amqswlm(clwlFunction)')

On Windows:

ALTER QMGR CLWLEXIT('path\amqswlm(clwlFunction)')

On z/OS:

ALTER QMGR CLWLEXIT(CSQ4BxF1)
where x is either ‘A’ or ‘C’, depending on the programming language of the version you are using.

On OS/400:

Enter the MQSC command:

ALTER QMGR CLWLEXIT('AMQSWLM   library   ')
(both the program name and the library name occupy 10 characters and are blank-padded to the right if necessary). Alternatively, use the CL command:
CHGMQM MQMNAME(qmgrname) CLWLEXIT('library/AMQSWLM')

Now, instead of using the supplied workload management algorithm, WebSphere MQ calls this exit to route all messages to your chosen queue manager.

 

Parent topic:

Workload balancing


qc10990_


 

Home