Software AG Products 10.5 | Administering Integration Server | Managing webMethods Messaging Triggers | Delaying Polling Requests for webMethods Messaging Triggers | How Integration Server Delays a Polling Request for a webMethods Messaging Trigger
 
How Integration Server Delays a Polling Request for a webMethods Messaging Trigger
To demonstrate how Integration Server polls the Broker for documents when a webMethods messaging trigger is inactive, a step-by-step example is provided in this section. This example relies on the default values for the related server configuration parameters, specifically:
*watt.server.control.triggerInputControl.delayIncrementInterval = 10000
*watt.server.control.triggerInputControl.delays = 500,1000,1500,5000
The following table describes each step that Integration Server takes as it polls the Broker for documents for an inactive webMethods messaging trigger.
Step
Description
1
The webMethods messaging trigger becomes inactive.
Integration Server considers a webMethods messaging trigger to be inactive if the trigger did not receive any documents in the last request to the Broker.
2
Integration Server begins to delay polling requests using the formula inactiveTime/interval = delay to determine the length of the polling delay. Using the defaults for the server parameters as stated above,
Integration Server determines the length of the polling delay using this equation:
0/1000 = 0
The delay at the zero index position of the watt.server.control.triggerInputControl.delays property is 500. Integration Server will wait 500 milliseconds and then poll the Broker for more documents.
3
If the polling request does not return any documents for the webMethods messaging trigger, Integration Server determines the length of the polling delay using this equation:
500/10000 = 0.05
Integration Server rounds the calculated delay of 0.05 down to 0. The delay at the zero index position of the watt.server.control.triggerInputControl.delays property is 500. Integration Server will wait 500 milliseconds and then poll the Broker for more documents.
4
If the trigger remains inactive Integration Server continues to determine the polling delay using the formula inactiveTime/interval = delay where the inactiveTime increases by 500 milliseconds each time.
5
When the trigger has been inactive for 10000 milliseconds, Integration Server determines the length of the polling delay using this equation:
10000/10000 = 1
The delay at the first index position of the watt.server.control.triggerInputControl.delays property is 1000. Integration Server will wait 1000 milliseconds and then poll the Broker for more documents.
6
If the trigger remains inactive Integration Server continues to determine the polling delay using the formula inactiveTime/interval = delay where the inactiveTime increases by 1000 milliseconds each time.
Note:Integration Server rounds the calculated delay down to the nearest integer. For example, when the trigger has been inactive for 15000 milliseconds, the length of the polling delay would be determined by this equation: 15000/10000 = 1.5. Integration Server rounds this down to 1 and uses the polling delay in the second index position of the watt.server.control.triggerInputControl.delays property which is 1000 milliseconds.
7
When the trigger has been inactive for 20000 milliseconds, Integration Server determines the length of the polling delay using this equation:
20000/10000 = 2
The delay at the second index position of the watt.server.control.triggerInputControl.delays property is 1500. Integration Server will wait 1500 milliseconds and then poll the Broker for more documents.
8
If the trigger remains inactive Integration Server continues to determine the polling delay using the formula inactiveTime/interval = delay where the inactiveTime increases by 1500 milliseconds each time.
9
When the trigger has been inactive for 30000 milliseconds, Integration Server determines the length of the polling delay using this equation:
30000/10000 = 3
The delay at the third index position of the watt.server.control.triggerInputControl.delays property is 5000. Integration Server will wait 5000 milliseconds and then poll the Broker for more documents.
10
If the trigger remains inactive Integration Server continues to determine the polling delay using the formula inactiveTime/interval = delay where the inactiveTime increases by 5000 milliseconds each time.
Because 5000 is the largest value specified in the array for watt.server.control.triggerInputControl.delays, the polling delay will never be more than 5000 milliseconds. Integration Server uses this polling delay until the trigger becomes active.
Note:
The last value in watt.server.control.triggerInputControl.delays is the longest lag between the Broker placing the document in the client queue on the Broker and Integration Server retrieving the document.
11
When a polling request to the Broker returns one or more documents, Integration Server considers the trigger to be active and stops using a polling delay.