Sending a message after a timed interval
Use TimeoutControl and TimeoutNotification nodes to send a message into a message flow after a timed interval.
Aim
Use TimeoutControl and TimeoutNotification nodes to send a message into a message flow 60 seconds after the message is received.
Description of the flow
The diagram shows the path of a message that contains a timeout request through a TimeoutControl node. A TimeoutNotification node with an identifier matching the TimeoutControl node then processes the timeout request. The diagram also shows the message that the TimeoutNotification node produces after processing the timeout request.
- Action set to SET
- Start Time set to current time + 60
- Count set to 1
The TimeoutControl node validates the timeout request; default values are assumed for properties that are not explicitly defined. The original message is then sent on to the next node in the message flow. If the request is valid, the TimeoutNotification node with the same Unique identifier as the TimeoutControl node propagates a copy of the message to the message flow 60 seconds after the message was received.
Timeout request messages are stored for processing on a queue used by the TimeoutNotification node. By default this queue is the SYSTEM.BROKER.TIMEOUT.QUEUE. However, you can use a Timer configurable service to specify an alternative timeout queue, which provides greater control over the storage of messages. For information about using an alternative timeout queue, see Configuring the storage of events for timeout nodes.
If a delay occurs between the node that calculates the start time and the TimeoutControl node, the start time in the message will have passed by the time it reaches the TimeoutControl node. If the start time is more than approximately five minutes in the past, a warning is issued and the TimeoutControl node rejects the timeout request. If the start time is less than five minutes in the past, the node processes the request as if it were immediate. Therefore, ensure that the start time in the timeout request message is a time in the future.