Queue service interval events: example 2

A sequence of MQPUT calls and MQGET calls, where the queue depth is not always one or zero.

This example also shows instances of the timer being reset without events being generated, for example, at time P2.

Figure 1. Queue service interval events - example 2
Illustration showing a graph of queue depth against time for two put and get operations. There are five points along the time axis: T0 is the initial point of interest. The queue depth is at its lowest point. At P1 the first put command is invoked, so the queue depth increases and the first service interval starts here. The service timer is enabled. At P2 the second put command is invoked, so the queue depth increases again. At G1 the first get command is invoked, so the queue depth decreases back to its previous level. The first service interval ends before this point, so the service timer is restarted. At G2 the second get command is invoked, so the queue depth decreases back to its original level. The second service interval ends after this point. A Queue Service Interval OK event is generated. The service timer is disabled.

Commentary

In this example, OK events are enabled initially and queue statistics were reset at time T0.

  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

Table 1 summarizes the event statistics for this example.
Table 1. Event statistics summary for example 2
Attribute Event 2
Time of event T(G2)
Type of event OK
TimeSinceReset T(G2) - T(0)
HighQDepth 2
MsgEnqCount 2
MsgDeqCount 2