Example 2 (queue service interval events)

This example illustrates a sequence of MQPUT calls and MQGET calls, where the queue depth is not always one or zero. It also shows instances of the timer being reset without events being generated, for example, at T(P2)

Figure 5. Queue service interval events - example 2

 

Commentary

In this example, OK events are enabled initially and queue statistics were reset at T(0).

  1. At P1, the first put starts the service timer.

  2. At P2, the second put does not generate an event because a put cannot cause an OK event.

  3. At G1, the service interval has now been exceeded and therefore an OK event is not generated. However, the MQGET call causes the service timer to be reset.

  4. At G2, the second get occurs within the service interval and this time an OK event is generated. The queue manager resets the event control attribute so that:

    1. The high event is automatically enabled.

    2. The OK event is disabled.

    Because the queue is now empty, the service timer is switched to an OFF state.

 

Event statistics summary for example 2

Table 7 summarizes the event statistics for this example.

Table 7. Event statistics summary for example 2
Time of event T(G2)
Type of event OK
TimeSinceReset T(G2) - T(0)
HighQDepth 2
MsgEnqCount 2
MsgDeqCount 2