Recording by using mirror queues mode
In Mirror Queues mode, HCL OneTest™ API uses an WebSphere® MQ API exit, which is installed on the queue manager, to take a copy of each message and put it into another queue. Therefore, if you record multiple queues, multiple mirror queues are set up.
About this task
Note: This recording mode is available only if IBM®
WebSphere® MQ 7.1 or
later is installed and configured in Library Manager.
For general information about WebSphere® MQ API exits,
see the WebSphere® MQ
documentation. For information about deploying the API exit, see Installing and configuring HCL OneTest API API exits.
Note: When you use mirror queues to
record an operation, you might encounter a race condition where the first few replies are sent
before the reply queue monitor is set up. To avoid this problem, record the transport rather than
the operation.
An example of the process is described in the following steps:
Procedure
- Start recording on Q1.
- HCL OneTest™ API (Recording Studio) configures the API exit to mirror all messages that are put onto Q1 to Q1_RIT.
- The client puts message onto Q1 with the reply queue specified as Q1R.
- The queue manager triggers the API exit, which puts a copy of the message onto Q1_RIT.
- HCL OneTest™ API (Recording Studio) subscribes to this queue and gets the message. HCL OneTest™ API detects that message specified a reply of Q1R. HCL OneTest™ API configures the API exit to mirror all messages from Q1R to Q1R_RIT.
- The server picks up the message from Q1 and replies to Q1R.
- The queue manager triggers the API exit, which puts a copy of the message onto Q1R_RIT.
- HCL OneTest™ API (Recording Studio) subscribes to this queue and gets the message.
-
The client receives the reply from Q1R.
When you stop recording, HCL OneTest™ API will, by default, delete the mirrored queue (Q1_RIT and Q1R_RIT in the example) and tell the API exit to stop mirroring. Thus, mirrored queues do not fill up with messages when you are not recording.