4
重試規定如下:如何成倍增加重試間隔春季RequestHandlerRetryAdvice
<bean id="retryAdvice"
class="org.springframework.integration.handler.advice.RequestHandlerRetryAdvice" >
<property name="retryTemplate">
<bean class="org.springframework.retry.support.RetryTemplate">
<property name="backOffPolicy">
<bean class="org.springframework.retry.backoff.ExponentialBackOffPolicy">
<property name="initialInterval" value="5000"/>
<property name="multiplier" value="3.0"/>
</bean>
</property>
<property name="retryPolicy">
<bean class="org.springframework.retry.policy.SimpleRetryPolicy">
<property name="maxAttempts" value="6" />
</bean>
</property>
</bean>
</property>
</bean>
我預計的時間間隔將與千方百計增加3倍。實際上,我得到了以下時間間隔: 5,15,30,30,30秒。請參閱下面的確切時間和間隔。 我錯誤地指定了什麼?
2016-05-10 10:07:49,714 - 0
2016-05-10 10:07:55,085 - 5.2
2016-05-10 10:08:10,457 - 15.4
2016-05-10 10:08:40,830 - 30.4
2016-05-10 10:09:11,230 - 30.4
2016-05-10 10:09:41,639 - 30.4