【发布时间】:2019-05-14 21:56:11
【问题描述】:
我正在尝试在使用 spring 集成调用肥皂服务时实现断路器。断路器按预期工作。问题是我需要在电路打开时实现回退机制。请提出可能的实施方式。
弹簧集成.xml
<int:chain input-channel="BLR" output-channel="location.reply.out" >
<ws:header-enricher>
<ws:soap-action value="${bangalore-service.quote.soap.action.value}"/>
</ws:header-enricher>
<ws:outbound-gateway uri="#{locationDetailsProperties.getBlrServiceEndPoint()}">
<ws:request-handler-advice-chain>
<bean class="org.springframework.integration.handler.advice.RequestHandlerCircuitBreakerAdvice">
<property name="threshold" value="3" />
<property name="halfOpenAfter" value="60000" />
</bean>
</ws:request-handler-advice-chain>
</ws:outbound-gateway>
</int:chain>
【问题讨论】: