Home

 

Cluster workload user exit

 

In most cases the workload management algorithm will be sufficient for your needs. However, so that we can provide your own user-exit program to tailor workload management, WebSphere MQ includes a user exit, the cluster workload exit.

If you have some particular information about your network or messages that you could use to influence workload balancing, you might decide to write a cluster workload exit program or use one supplied by a third party. For example, you might know which are the high-capacity channels or the cheap network routes, or you might decide that you want to route messages depending upon their content.

The cluster workload exit is called when a cluster queue is opened using the MQOPEN or MQPUT1 call, and when a message is put to a queue using the MQPUT call. The target queue manager selected at MQOPEN time is fixed if MQOO_BIND_ON_OPEN is specified (see MQOPEN). In this case, even if the target queue manager fails, the exit is not run again. In cases where the target queue manager is not fixed, if the target queue manager chosen at the time of an MQPUT call is unavailable, or fails while the message is still on the transmission queue, the exit is called again to select a new target queue manager.

You name cluster workload exits in the queue manager definition by specifying the cluster workload exit attribute on the ALTER QMGR command. For example:

ALTER QMGR CLWLEXIT(myexit)

On platforms other than z/OS, the queue manager will load the new cluster workload exit the next time the queue manager is started.

If the queue manager definition does not contain a cluster workload exit program name, the cluster workload exit is not called.

Cluster workload exits are called with an exit parameter structure (MQWXP), a message definition structure (MQMD), a message length parameter, and a copy of the message (or part of the message). See Cluster workload exit call and data structures for reference information about the cluster workload exit and the associated data structures.

On non-z/OS platforms, when using CLWLMode=FAST, each operating system process loads its own copy of the exit, and different connections to the queue manager can cause different copies of the exit to be invoked. When the exit is run in the default safe mode CLWLMode=SAFE, a single copy of the exit runs in its own separate process. For more information on how to set CLWLMode see the WebSphere MQ System Administration Guide.

 

Parent topic:

Workload balancing


qc10950_


 

Home