재시도 조건으로 http 아웃 바운드 게이트웨이 호출을 만들고 싶습니다. 아웃 바운드 게이트웨이는 내가 반환 한 나머지 API가 ERROR 또는 COMPLETE를 반환 할 때까지 다시 시도합니다.HTTP 아웃 바운드 조건으로 재 시도 (검사기 조건의 경우)
내가 뭘 할 수 있습니다 :
<int-http:outbound-gateway request-channel="checkJobChannel"
url="http://host/rest/job-status"
http-method="GET"
extract-request-payload="true"
expected-response-type="java.lang.String"
reply-timeout="10000"
reply-channel="checkJobChannel.reply"
auto-startup="true"
transfer-cookies="true">
다음 라우터
@Router(inputChannel = "checkJobChannel.reply",applySequence = "true")
public String pointJob(Message<?>reply) {
String returnChannel ="";
if(reply.getPayload().get("status").equals("RUNNING")){
returnChannel="checkJobChannel";
}else if(reply.getPayload().get("status").equals("COMPLETE")|reply.getPayload().get("status").equals("ERROR")){
returnChannel="nextChannel";
}
return returnChannel;
}
내가 그렇게 할 수 있습니까? 감사. 그것을 달성하기위한 간단한 방법은 무엇입니까?
좋아, Artem, 그걸 구현하려고합니다. 감사 – Harji