Retry Action

Retry actions such as enqueueing a message to a JMS queue that is stopped, inserting a record with a unique key constraint error, and so on, enable you to retry a task that caused the error. A new thread is started with every retry action. Therefore, with every retry action, a new transaction starts. Table 22-1 describes the options available with the retry action. Retry actions are applicable to parallel routing rules only.

Table 22-1 Retry Action Options

Option Description

Retry Count

Retry N times.

Retry Interval

Delay in seconds for a retry.

Exponential Backoff

Retry interval increase with an exponential backoff.

Retry Failure Action

Chain to this action if a retry N times fails.

Retry Success Action

Chain to this action if a retry succeeds.

Note:

Exponential backoff indicates that the next retry attempt is scheduled at 2 x the delay, where delay is the current retry interval. For example, if the current retry interval is 2 seconds, the next retry attempt is scheduled at 4, the next at 8, and the next at 16 seconds until the retryCount value is reached.

The following example shows how to specify the retry action:

 <Action id="ora-retry">
 <retry>
 <retryCount>3</retryCount>
 <retryInterval>2</retryInterval>
 <exponentialBackoff/>
 <retryFailureAction ref="ora-java"/>
 <retrySuccessAction ref="ora-java"/>
 </retry>
 </Action>

If you set the retry interval in the fault policy to a duration of less than 30 seconds, then the retry may not happen within the specified intervals. This is because the default value of the org.quartz.scheduler.idleWaitTime property is 30 seconds, and the scheduler waits for 30 seconds before retrying for available triggers, when the scheduler is otherwise idle. If the retry interval is set to a value of less than 30 seconds, then latency is expected.

If you want the system to use a retry interval that is less than 30 seconds, add the following property under the section <property name="quartzProperties"> in the fabric-config-core.xml file:

org.quartz.scheduler.idleWaitTime=<value>