OpenTP1 Version 7 Description

[Contents][Glossary][Index][Back][Next]

3.3.8 MCF message queues and the sending and receiving of messages

Organization of this subsection
(1) Input and output queues
(2) Fallback operation using the memory queue instead of the disk queue
(3) Holding messages in the disk queue
(4) Processing when the disk queue is full

(1) Input and output queues

OpenTP1 uses queues to store messages that have been received or are to be sent.

An input queue manages the input messages as processing requests. An output queue manages the output messages as processing results.

In the MCF application definition for each application, you can specify whether a disk queue or a memory queue is to be used for the input queue. In the logical terminal definition for each logical terminal, you can specify whether both a disk queue and a memory queue are to be used or only a memory queue is to be used. If you specify use of both queues, send-only messages always use the disk queue. If an inquiry message uses a disk queue, the corresponding response message also uses a disk queue; if an inquiry message uses a memory queue, the corresponding response message also uses a memory queue.

If a disk queue is used, the messages in it can be reused at recovery restart after abnormal termination of the online system. The messages that do not need to be reused at recovery restart should be placed in a memory queue, which provides high-speed processing.

OpenTP1 uses a message queue file as a disk queue. If an OpenTP1 administrator specifies that the disk queue is to be used, the administrator should create an MCF message queue file.

You can place the MCF message queue on hold status by using the mcfthldiq or mcfthldoq command. The hold status is also inherited at restart after abnormal termination of an online system. When the hold status need not be inherited (for example, if an error occurs while replacing a user server using the input queue), the inheritance can be suppressed using an option. When the status inheritance is suppressed it is unnecessary to release the hold status using the mcftrlsiq command at restart. For details of the message queue file, see 4.3.1 Queue files: MCF message queue file.

Figure 3-34 illustrates message exchange using the input and output queues.

Figure 3-34 Message exchange using the input and output queues

[Figure]

(2) Fallback operation using the memory queue instead of the disk queue

If the disk queue is disabled for some reason at the start of OpenTP1, instead of the disk queue the memory queue can be used to start OpenTP1. This is called a fallback operation using the memory queue. In the extended reservation definition for each input queue and output queue, you can specify whether to perform the fallback operation. If you do not perform the fallback operation using the memory queue, the messages to be stored in the disk queue are discarded. In such a case, an MHP designed to process the MCF event that reports discarding of messages (ERREVT2) is started, if it exists.

If the fallback operation using the memory queue is performed, a message (KFCA11065-W or KFCA11066-W) is displayed.

Note that when starting OpenTP1 by the fallback operation using the memory queue, the messages cannot be recovered during complete recovery after shutdown of online processing.

If the disk queue is disabled during online processing, a fallback operation using the memory queue cannot be performed.

For details about the causes and recovery methods for the fallback operation, see the manual OpenTP1 Operation.

(3) Holding messages in the disk queue

A disk queue can hold messages even after they are read so that they can be reread. A message held for a possible reread is called a hold message. In the MCF message-queue service definition, you can specify the number of messages to be held.

A memory queue cannot hold messages.

For each disk queue, if the ratio of the number of messages waiting to be de-queued and the number of hold messages exceeds a user-defined percentage, a message warning about the usage percentage of the disk queue can be output. In the MCF message-queue service definition, you can specify the disk-queue usage percentage for which a warning message is to be output.

(4) Processing when the disk queue is full

If the disk input queue becomes full, new received messages are discarded. In such a case, if an MHP for ERREVT2 (the MCF event that reports discarding of a message) exists, this MHP is started. If the disk output queue becomes full, the communication functions (dc_mcf_send(), dc_mcf_reply(), dc_mcf_sendrecv(), dc_mcf_sendsync(), dc_mcf_resend(), dc_mcf_execap()) return an error.