What happens if a cluster queue is disabled for MQPUT
All instances of a cluster queue that is being used for workload balancing might be disabled for MQPUT. Applications putting a message to the queue either receive a MQRC_CLUSTER_PUT_INHIBITED
or a MQRC_PUT_INHIBITED
return code. You might want to modify this behavior.
Problem
When a cluster queue is disabled for MQPUT, its status is reflected in the repository of each queue manager that is interested in that queue. The workload management algorithm tries to send messages to destinations that are enabled for MQPUT. If there are no destinations enabled for MQPUT and no local instance of a queue, an MQOPEN call that specified MQOO_BIND_ON_OPEN
returns a return code of MQRC_CLUSTER_PUT_INHIBITED
to the application. If MQOO_BIND_NOT_FIXED
is specified, or there is a local instance of the queue, an MQOPEN call succeeds but subsequent MQPUT calls fail with return code MQRC_PUT_INHIBITED
.
Solution
You can write a user exit program to modify the workload management routines so that messages can be routed to a destination that is disabled for MQPUT.
- Choose another appropriate destination, if there is one.
- Place the message on the dead-letter queue.
- Return the message to the originator, if there is no dead-letter queue