Latency processing

The simulators can be configured introduce latency, which simulates the amount of time that is taken when messages are exchanged with the genuine external services. The latency is controlled on a per-simulator basis by the user-defined properties (UDP) for the simulator.

The following sections provide more information about the user-defined properties for latency processing that a simulator can have.

User-defined property for latency

This simulator-specific property defines a variable amount of latency that is to be introduced by external services during debtor or creditor checks. It is used to simulate the amount of processing time that is used by the external service. The default value is 100 (milliseconds).

User-defined property for fixed latency model

This simulator-specific property defines the mode that is used to calculate the latency. It indicates whether the latency is added independently of the IBM® MQ wait time. The default value is TRUE.

Fixed latency mode = TRUE
The latency time is calculated by adding the amount of latency from the UDP value to the amount of time that the compute node of the simulator spent processing. It does not consider the amount of time that the message spent on the input IBM MQ queue or the processing time of the node itself. The effective latency within the compute node of the simulator matches the UDP value. However, the total latency for interacting with the simulator includes the IBM MQ wait time and is usually longer than the value that is specified in the user-defined property.
Fixed latency mode = FALSE
In this mode, the amount of time that the message spent on the input queue of the simulator is calculated. It is the difference between the IBM MQ put time of the message and the current time of the compute node of the simulator. This calculated time is compared to the latency time that is specified in the latency UDP.
If the latency value in the UDP is greater than the amount time that was used by the simulator so far, the simulator node sleeps until the latency time is reached. Therefore, when the simulator compute node exits, the latency matches the UDP value. These values match because the latency includes the processing time of the compute node and the amount of time that the message spent on the input queue of the simulator.

User-defined properties for extra latency

Several simulators have user-defined properties that can be used to add extra latency during processing. These properties can be used to cause a timeout to occur during certain stages of processing.
Important: When you are configuring the extra latency properties, consider that the simulator instance that is processing a message with extra latency does not receive messages that arrive concurrently. To avoid this serial behavior, increase the number of extra instances for this simulator.