Below are the Oracle JCA retry Adapter endpoint properties.
1. jca.retry.count
2. jca.retry.interval
3. jca.retry.backoff
4. jca.retry.
MaxInterval
1.
jca.retry.count :
This property specifies count of no. of times adapter should
be called if adapter invocation is failed each time it is invoked.
2.
jca.retry.interval :
This property specifies the time
interval between adapter invocations.
3.
jca.retry.backoff
:
backoff increases the delay among retry intervals in a
Geometric progression.
4.
jca.retry.
MaxInterval :
maxInterval controls the max value of retry interval (if
backoff > 1). Means if you wish to make sure that retry interval should not
increase to huge value when you are using backoff property then maxInterval
property is the property which will help you do this
Examples:
Ex 1: Using count and interval properties.
If I have defined these two parameters (count and interval)
in my composite.xml for the file adapter reference.
<property name="jca.retry.count"
type="xs:int" many="false"
override="may">3</property>
<property name="jca.retry.interval" type="xs:int" many="false" override="may">1</property>
<property name="jca.retry.interval" type="xs:int" many="false" override="may">1</property>
Values of properties are.
Count= 3
Interval= 1
Once instance is created and if adapter invocation fails then
it will retry 3 times on a regular interval of 1 second. So in all we will have 4 adapter invocations.
Ex 2: Using count, interval and backoff properties.
If composite.xml file is as below.
<property name="jca.retry.count"
type="xs:int" many="false"
override="may">3</property>
<property name="jca.retry.interval" type="xs:int" many="false" override="may">1</property>
<property name="jca.retry.backoff" type="xs:int" many="false" override="may">2</property>
<property name="jca.retry.interval" type="xs:int" many="false" override="may">1</property>
<property name="jca.retry.backoff" type="xs:int" many="false" override="may">2</property>
Values of properties above are.
Count= 7
Interval = 1
Backoff = 2
The first retry will start at an interval of 1 second
The second retry will start at an interval of 2 second and
The third retry will start at an interval of 4 second.
The fourth retry will start at an interval of 8 second.
The fifth retry will start at an interval of 16 second.
The sixth retry will start at an interval of 32 second.
The seventh retry will start at an interval of 64 second.
So total 7 retries will be made.
Ex 3 : Using count, interval, backoff and MaxInterval properties.
If composite.xml file is as below.
jca.retry.count=7
jca.retry.interval=1
jca.retry.backoff=2
jca.retry.maxInterval=30
The first retry will start at an interval of 1 second
The second retry will start at an interval of 2 second and
The third retry will start at an interval of 4 second.
The fourth retry will start at an interval of 8 second.
The fifth retry will start at an interval of 16 second.
The sixth retry should start at an interval of 32 second.
But it will not since we have defined max retry interval can be 30 and it cannot
exceed above 30.
No comments:
Post a Comment