+

Search Tips | Advanced Search

Sample cluster workload exit

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

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.

Indicate which queue manager you want messages to be sent to. Supply the name of the cluster-receiver channel in the CLWLDATA attribute on the queue manager definition. For example:
ALTER QMGR CLWLDATA(' my-cluster-name. my-queue-manager ')

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

On UNIX and Linux :

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 IBM i, use either of the following commands:

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