Enabling and disabling events
With the exception of channel events, all instrumentation events must be enabled before they can be generated. For example, the conditions giving rise to a Queue Full event are:
- Queue Full events are enabled for a specified queue and
- An application issues an MQPUT request to put a message on that queue, but the request fails because the queue is full.
You can enable and disable events by specifying the appropriate values for queue manager or queue attributes (or both) depending on the type of event. You do this using:
Attributes related to events for both queues and queue managers can be set by command only. They are not supported by the MQI call MQSET.
Enabling and disabling queue manager events
Enable queue manager events by specifying the appropriate attribute on the MQSC command ALTER QMGR. For example, to enable inhibit events on the default queue manager, use this MQSC command:
ALTER QMGR INHIBTEV (ENABLED)To disable the event, set the INHIBTEV attribute to DISABLED using this MQSC command:
ALTER QMGR INHIBTEV (DISABLED)
Authority events
You enable authority events using:
- The AUTHOREV attribute on the MQSC command ALTER QMGR
Inhibit events
You enable inhibit events using:
- The INHIBTEV attribute on the MQSC command ALTER QMGR
Local events
You enable local events using:
- The LOCALEV attribute on the MQSC command ALTER QMGR
Remote events
You enable remote events using:
- The REMOTEEV attribute on the MQSC command ALTER QMGR
Start and stop events
You enable start and stop events using:
- The STRSTPEV attribute on the MQSC command ALTER QMGR
Enabling queue manager events summary
Table 2 summarizes how to enable queue manager events:
Table 2. Enabling queue manager events using MQSC commands
Event Queue manager attribute Authority
Inhibit
Local
Remote
Start and StopAUTHOREV (ENABLED)
INHIBTEV (ENABLED)
LOCALEV (ENABLED)
REMOTEEV (ENABLED)
STRSTPEV (ENABLED)
Enabling channel events
Most channel events are enabled automatically and you cannot enable or disable them by command. The exceptions are the two automatic channel definition events. However, you can suppress channel events by not defining the channel events queue, or by making it put-inhibited. Note that this could cause a queue to fill up if remote event queues point to a put-inhibited channel events queue.
If a queue manager does not have a SYSTEM.ADMIN.CHANNEL.EVENT queue, or if this queue is put-inhibited, all channel event messages are discarded, unless they are being put by an MCA across a link to a remote queue. In this case they are put on the dead-letter queue.
Channel auto-definition
The generation of these events is controlled by the ChannelAutoDefEvent queue-manager attribute. Refer to the WebSphere MQ Application Programming Reference manual for further details of this attribute.
Enabling performance events
Performance events as a whole must be enabled on the queue manager, or no performance events can occur. You can then enable specific performance events by setting the appropriate queue attribute. You also have to specify the conditions that give rise to the event.
Enabling queue depth events
By default, all queue depth events are disabled. To configure a queue for any of the queue depth events :
- Enable performance events on the queue manager.
- Enable the event on the required queue.
- Set the limits, if required, to the appropriate levels, expressed as a percentage of the maximum queue depth. For more information, see Enabling queue service interval events.
Enabling queue service interval events
To configure a queue for queue service interval events :
- Enable performance events on the queue manager.
- Set the control attribute for a Queue Service Interval High or OK event on the queue as required.
- Specify the service interval time by setting the QServiceInterval attribute for the queue to the appropriate length of time. For more information, see Understanding queue depth events.
When enabled, a queue service interval event can be generated only on an MQPUT call or an MQGET call. The event is not generated when the elapsed time becomes equal to the service interval time.
Enabling configuration events
Configuration events are only available on z/OS.
Enable configuration events specifying the CONFIGEV attribute on the MQSC command ALTER QMGR:
ALTER QMGR CONFIGEV (ENABLED)To disable the events, set the CONFIGEV attribute to DISABLED:
ALTER QMGR CONFIGEV (DISABLED)WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.